mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Test:jsdoc codefix for variable-like declarations
This commit is contained in:
parent
16ccb66377
commit
b082c27fbe
5
tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts
Normal file
5
tests/cases/fourslash/codeFixChangeJSDocSyntax10.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// @strict: true
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// function f(x: [|number?|]) {
|
||||
//// }
|
||||
verify.rangeAfterCodeFix("number | null", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0);
|
||||
5
tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts
Normal file
5
tests/cases/fourslash/codeFixChangeJSDocSyntax11.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// @strict: true
|
||||
/// <reference path='fourslash.ts' />
|
||||
//// var f = function f(x: [|string?|]) {
|
||||
//// }
|
||||
verify.rangeAfterCodeFix("string | null | undefined", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 1);
|
||||
6
tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts
Normal file
6
tests/cases/fourslash/codeFixChangeJSDocSyntax12.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @strict: true
|
||||
/// <reference path='fourslash.ts' />
|
||||
////class C {
|
||||
//// p: [|*|]
|
||||
////}
|
||||
verify.rangeAfterCodeFix("any", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0);
|
||||
6
tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts
Normal file
6
tests/cases/fourslash/codeFixChangeJSDocSyntax13.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// @strict: true
|
||||
/// <reference path='fourslash.ts' />
|
||||
////class C {
|
||||
//// p: [|*|] = 12
|
||||
////}
|
||||
verify.rangeAfterCodeFix("any", /*includeWhiteSpace*/ false, /*errorCode*/ 8020, 0);
|
||||
Loading…
x
Reference in New Issue
Block a user