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
Actual behavior:
The first assignment is valid, the second throws an error saying "Type 'Foo' is not assignable to type 'Foo | undefined'."
This block a project that depends on the TypeScript api, and on some package that also depends on TypeScript. So TS is installed on node_modules/typescript and node_modules/foo/node_modules/typescript. (Normally NPM would install TypeScript only once, but foo is a symlink.) This causes that objects from one installation of TypeScript cannot be passed to the other. The following code illustrates that:
Type 'ts.Identifier' is not assignable to type 'ts.Identifier'.
Types of property 'originalKeywordKind' are incompatible.
Type 'SyntaxKind | undefined' is not assignable to type 'SyntaxKind | undefined'.
Type 'SyntaxKind.Unknown' is not assignable to type 'SyntaxKind | undefined'.
And on error:
Type 'SyntaxKind' is not assignable to type 'SyntaxKind | undefined'.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.0 RC. This was working correctly in 2.0 beta.
Code
Expected behavior:
Both assignments are valid.
Actual behavior:
The first assignment is valid, the second throws an error saying "Type 'Foo' is not assignable to type 'Foo | undefined'."
This block a project that depends on the TypeScript api, and on some package that also depends on TypeScript. So TS is installed on
node_modules/typescript
andnode_modules/foo/node_modules/typescript
. (Normally NPM would install TypeScript only once, butfoo
is a symlink.) This causes that objects from one installation of TypeScript cannot be passed to the other. The following code illustrates that:Error on the declaration of
identifier2
:And on
error
:The text was updated successfully, but these errors were encountered: