Company
Date Published
Author
Graham McNicoll
Word count
453
Language
English
Hacker News points
None

Summary

GrowthBook has enhanced its client-side SDKs, originally written in 100% Typescript, by addressing previous limitations in type safety. While Typescript provided a solid foundation for type inference, it couldn't catch issues like typos in feature names or incorrect fallback value types. The latest update now allows for compile-time type checks, ensuring that errors such as a mismatched feature flag value type are caught early by defining all feature names and types when creating a GrowthBook instance. Additionally, GrowthBook introduced a command-line tool to automatically generate and maintain these feature types, simplifying the process and reducing human error. This tool can be integrated into development workflows to keep feature types up-to-date and is part of broader plans to expand type safety, including supporting strongly typed targeting attributes and integrating these capabilities across all SDK languages.