Skip to content

Commit 2dbe580

Browse files
committed
Add test
1 parent bc4df37 commit 2dbe580

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
// @strict: true
4+
// @lib: esnext
5+
6+
//// interface ComponentOptions<Props> {
7+
//// setup?: (props: Props) => void;
8+
//// name?: string;
9+
//// }
10+
////
11+
//// interface FunctionalComponent<P> {
12+
//// (props: P): void;
13+
//// }
14+
////
15+
//// type ConcreteComponent<Props> =
16+
//// | ComponentOptions<Props>
17+
//// | FunctionalComponent<Props>;
18+
////
19+
//// type Component<Props = {}> = ConcreteComponent<Props>;
20+
////
21+
//// type WithInstallPlugin = { _prefix?: string };
22+
////
23+
////
24+
//// /**/
25+
//// export function withInstall<C extends Component, T extends WithInstallPlugin>(
26+
//// component: C | C[],
27+
//// target?: T,
28+
//// ): string {
29+
//// const componentWithInstall = (target ?? component) as T;
30+
//// const components = Array.isArray(component) ? component : [component];
31+
////
32+
//// const { name } = components[0];
33+
//// if (name) {
34+
//// return name;
35+
//// }
36+
////
37+
//// return "";
38+
//// }
39+
40+
verify.noErrors();
41+
42+
goTo.marker();
43+
edit.insert("type C = Component['name']");
44+
45+
verify.noErrors();

0 commit comments

Comments
 (0)