const optionsLenient = {
noImplicitAny: true,
};
isStrictCompilerOptionEnabled(optionsLenient, "noImplicitAny"); // true
isStrictCompilerOptionEnabled(optionsLenient, "noImplicitThis"); // false
const optionsStrict = {
noImplicitThis: false,
strict: true,
};
isStrictCompilerOptionEnabled(optionsStrict, "noImplicitAny"); // true
isStrictCompilerOptionEnabled(optionsStrict, "noImplicitThis"); // false
Checks if a given compiler option is enabled, accounting for whether all flags (except
strictPropertyInitialization
) have been enabled bystrict: true
.