The compiler option "experimentalDecorators" changes the function signature used by decorators. As the author of a library, I can't control whether my users are using modern or experimental decorators. I'm currently using overloads to type my decorators, one signature for each mode. However, this means that if someone uses a decorator incorrectly, they get two type errors (one per overload), even though only one is actually relevant. If I could detect which mode they're using, then I could use a conditional type to provide them with only the correct signature.
type Decorator = IsExperimentalDecorators ? ExperimentalDecorator : ModernDecorator