You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Compiled w/o error under 2.1 Actual behavior:
Generates error:
index.ts(9,4): error TS2322: Type 'RuleContext | undefined' is not assignable to type 'RuleContext'.
Type 'undefined' is not assignable to type 'RuleContext'.
The text was updated successfully, but these errors were encountered:
We changed the type of defaulted parameters from T | undefined to T in 2.2, but it seems wrong to strip out undefined from an explicitly-written type annotation
This is an intended result of #12033, but we should revisit whether to use the control-flow-narrowing mechanism instead of the one that shipped, which simply strips off | undefined from default-initialised and optional parameters.
TypeScript Version: 2.2.1
Effective type of argument
p
below seems to not match explicit declaration under tsc 2.2.1Code
Expected behavior:
Compiled w/o error under 2.1
Actual behavior:
Generates error:
The text was updated successfully, but these errors were encountered: