Skip to content

Commit

Permalink
Add extra test cases for string literal completions (#54714)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored Jun 20, 2023
1 parent f415b19 commit b1c2e8c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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`] });
Original file line number Diff line number Diff line change
@@ -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`] });

0 comments on commit b1c2e8c

Please sign in to comment.