File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
packages/typescript-estree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -379,10 +379,7 @@ export class Converter {
379379 * property instead of a kind property. Recursively copies all children.
380380 */
381381 private deeplyCopy ( node : TSNode ) : any {
382- if (
383- node . kind >= SyntaxKind . FirstJSDocNode &&
384- node . kind <= SyntaxKind . LastJSDocNode
385- ) {
382+ if ( node . kind === ts . SyntaxKind . JSDocFunctionType ) {
386383 throw createError (
387384 this . ast ,
388385 node . pos ,
Original file line number Diff line number Diff line change @@ -239,8 +239,9 @@ describe('convert', () => {
239239
240240 it ( 'should throw error on jsDoc node' , ( ) => {
241241 const jsDocCode = [
242- 'type foo = ?foo<T> | ?(() => void)?' ,
243- 'var a: function(b): c;' ,
242+ 'const x: function(new: number, string);' ,
243+ 'const x: function(this: number, string);' ,
244+ 'var g: function(number, number): number;' ,
244245 ] ;
245246
246247 for ( const code of jsDocCode ) {
You can’t perform that action at this time.
0 commit comments