mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Merge pull request #17250 from Microsoft/quickfix-jsdoc-in-ts
Quickfix jsdoc in Typescript files
This commit is contained in:
4
tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax1.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|?|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("any");
|
||||
4
tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax2.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|*|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("any");
|
||||
4
tests/cases/fourslash/codeFixChangeJSDocSyntax3.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax3.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|......number[][]|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("number[][][][]");
|
||||
4
tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax4.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|Array.<number>|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("number[]");
|
||||
5
tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts
Normal file
5
tests/cases/fourslash/codeFixChangeJSDocSyntax5.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @strict: true
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|?number|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("number | null", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0);
|
||||
5
tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts
Normal file
5
tests/cases/fourslash/codeFixChangeJSDocSyntax6.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @strict: true
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|number?|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("number | null | undefined", /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 1);
|
||||
4
tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax7.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|!number|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("number");
|
||||
4
tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax8.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|function(this: number, number): string|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("(this: number, arg1: number) => string");
|
||||
4
tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts
Normal file
4
tests/cases/fourslash/codeFixChangeJSDocSyntax9.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var x: [|function(new: number)|] = 12;
|
||||
|
||||
verify.rangeAfterCodeFix("new () => number");
|
||||
Reference in New Issue
Block a user