mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Add extra test cases for string literal completions (#54714)
This commit is contained in:
parent
f415b196fc
commit
b1c2e8caad
@ -0,0 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @strict: true
|
||||
////
|
||||
//// declare function func<
|
||||
//// const T extends 'a' | 'b' | undefined = undefined,
|
||||
//// >(arg?: T): string;
|
||||
////
|
||||
//// func('/*1*/');
|
||||
|
||||
verify.completions({ marker: ["1"], exact: [`a`, `b`] });
|
||||
@ -0,0 +1,16 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @strict: true
|
||||
////
|
||||
//// interface Func {
|
||||
//// <Key extends "a" | "b">(
|
||||
//// ...args:
|
||||
//// | [key: Key, options?: any]
|
||||
//// | [key: Key, defaultValue: string, options?: any]
|
||||
//// ): string;
|
||||
//// }
|
||||
////
|
||||
//// declare const func: Func;
|
||||
////
|
||||
//// func("/*1*/");
|
||||
|
||||
verify.completions({ marker: ["1"], exact: [`a`, `b`] });
|
||||
Loading…
x
Reference in New Issue
Block a user