fix(typescript): preserve decorator on interface (#4632)

master
Ika 2018-06-05 00:08:24 +08:00 committed by GitHub
parent abef84684d
commit f27f6c525b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 4 deletions

View File

@ -55,7 +55,7 @@
"semver": "5.4.1",
"string-width": "2.1.1",
"typescript": "2.9.0-dev.20180421",
"typescript-eslint-parser": "eslint/typescript-eslint-parser#2960b002746c01fb9cb15bb5f4c1e7e925c6519a",
"typescript-eslint-parser": "16.0.0",
"unicode-regex": "1.0.1",
"unified": "6.1.6"
},

View File

@ -247,3 +247,20 @@ class MyContainerComponent {
}
`;
exports[`interface.ts 1`] = `
// invalid place but shouldn't be removed
@hello()
interface MyInterface {
id: string;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// invalid place but shouldn't be removed
@hello()
interface MyInterface {
id: string;
}
`;

View File

@ -0,0 +1,6 @@
// invalid place but shouldn't be removed
@hello()
interface MyInterface {
id: string;
}

View File

@ -5556,9 +5556,9 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
typescript-eslint-parser@eslint/typescript-eslint-parser#2960b002746c01fb9cb15bb5f4c1e7e925c6519a:
version "14.0.0"
resolved "https://codeload.github.com/eslint/typescript-eslint-parser/tar.gz/2960b002746c01fb9cb15bb5f4c1e7e925c6519a"
typescript-eslint-parser@16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/typescript-eslint-parser/-/typescript-eslint-parser-16.0.0.tgz#14a9ab75932b15af919602faef553c6f0487f352"
dependencies:
lodash.unescape "4.0.1"
semver "5.5.0"