5b79b942e8
* add action for enabling experimentalDescorators option in user config file, change error message for this case #29035 * add missing changes in tests * Add "experimental decorators" tests for jsconfig file
28 lines
550 B
TypeScript
28 lines
550 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @Filename: /dir/a.ts
|
|
////declare const decorator: any;
|
|
////class A {
|
|
//// @decorator method() {};
|
|
////};
|
|
|
|
// @Filename: /dir/tsconfig.json
|
|
////{
|
|
//// "compilerOptions": {
|
|
//// "experimentalDecorators": false,
|
|
//// }
|
|
////}
|
|
|
|
goTo.file("/dir/a.ts");
|
|
verify.codeFix({
|
|
description: "Enable the 'experimentalDecorators' option in your configuration file",
|
|
newFileContent: {
|
|
"/dir/tsconfig.json":
|
|
`{
|
|
"compilerOptions": {
|
|
"experimentalDecorators": true,
|
|
}
|
|
}`,
|
|
},
|
|
});
|