TypeScript/tests/cases/fourslash/codefixEnableExperimentalDecorators_disabledInCompilerOptionsInJsconfig.ts
amaksimovich2 5b79b942e8 add action for enabling experimentalDescorators option in user config… (#30484)
* 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
2019-04-25 14:55:04 -07:00

28 lines
550 B
TypeScript

/// <reference path='fourslash.ts' />
// @Filename: /dir/a.ts
////declare const decorator: any;
////class A {
//// @decorator method() {};
////};
// @Filename: /dir/jsconfig.json
////{
//// "compilerOptions": {
//// "experimentalDecorators": false,
//// }
////}
goTo.file("/dir/a.ts");
verify.codeFix({
description: "Enable the 'experimentalDecorators' option in your configuration file",
newFileContent: {
"/dir/jsconfig.json":
`{
"compilerOptions": {
"experimentalDecorators": true,
}
}`,
},
});