2017-09-18 19:05:44 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @allowNonTsExtensions: true
|
|
|
|
// @Filename: /a.js
|
|
|
|
////function /**/MyClass() {}
|
|
|
|
////MyClass.prototype.foo = function() {
|
|
|
|
//// try {} catch() {}
|
|
|
|
////}
|
|
|
|
|
2018-03-02 21:57:29 +01:00
|
|
|
verify.codeFix({
|
|
|
|
description: "Convert function to an ES2015 class",
|
|
|
|
newFileContent:
|
2017-09-18 19:05:44 +02:00
|
|
|
`class MyClass {
|
|
|
|
constructor() { }
|
|
|
|
foo() {
|
2020-06-26 23:48:19 +02:00
|
|
|
try { } catch () { }
|
2017-09-18 19:05:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`,
|
2018-03-02 21:57:29 +01:00
|
|
|
});
|