File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 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 ( ) ;
You can’t perform that action at this time.
0 commit comments