-
Notifications
You must be signed in to change notification settings - Fork 63
Updated NodeType of TSTypeLiteral to TSLiteralType for typescript 2.9.x #137
Conversation
I would appreciate some pointers on how to create a test case for this, as this only affects the newer version of typescript and the parser |
When you say it only affects the newer version, it is not a breaking change, right? If this change doesn't affect users on older versions then I don't think we need to stress about it. You could just add your source above as a test case |
@JamesHenry Prior to the update, export type ClassValue = string | number | ClassDictionary | ClassArray | undefined | null | false; was not caught by the 'typescript/no-type-alias': ['error', {
allowAliases: 'in-unions-and-intersections',
allowCallbacks: true,
allowsLiterals: 'in-unions-and-intersections',
allowMappedTypes: 'in-unions-and-intersections',
}], |
I have just upgraded one of my projects to I'm getting the same error as @weikinhuang:
for configuration: "typescript/no-type-alias": ["error", {
"allowAliases": "in-unions-and-intersections",
"allowCallbacks": true,
"allowsLiterals": "in-unions-and-intersections",
"allowMappedTypes": "in-unions-and-intersections",
}] and source: export type <SomeType> = <union of types> Looking at this patch, what is unclear (to me) is where upstream the change from My assumption was that it must have been a change in Has anyone identified yet if the change from |
I just started setting up ESLint for my project and ran into this issue as well. My package.json has the following versions in it {
"devDependencies": {
"eslint": "5.5.0",
"eslint-plugin-typescript": "0.12.0",
"typescript": "3.0.3",
"typescript-eslint-parser": "18.0.0"
}
} |
Hi @weikinhuang, |
@bradzacher
type foo = "BAR" and this issue got fixed in f6041a6 |
Cool beans, thanks @armano2 |
Thanks |
After upgrading to
[email protected]
and[email protected]
I've encountered an issue with running thetypescript/no-type-alias
rule against this file:It would crash with:
At which point, I added this changeset, and some logging for the node, I got: