Skip to content

Commit b1c2e8c

Browse files
authored
Add extra test cases for string literal completions (#54714)
1 parent f415b19 commit b1c2e8c

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/// <reference path="fourslash.ts" />
2+
// @strict: true
3+
////
4+
//// declare function func<
5+
//// const T extends 'a' | 'b' | undefined = undefined,
6+
//// >(arg?: T): string;
7+
////
8+
//// func('/*1*/');
9+
10+
verify.completions({ marker: ["1"], exact: [`a`, `b`] });
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/// <reference path="fourslash.ts" />
2+
// @strict: true
3+
////
4+
//// interface Func {
5+
//// <Key extends "a" | "b">(
6+
//// ...args:
7+
//// | [key: Key, options?: any]
8+
//// | [key: Key, defaultValue: string, options?: any]
9+
//// ): string;
10+
//// }
11+
////
12+
//// declare const func: Func;
13+
////
14+
//// func("/*1*/");
15+
16+
verify.completions({ marker: ["1"], exact: [`a`, `b`] });

0 commit comments

Comments
 (0)