Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Apr 9, 2024
1 parent bc4df37 commit 2dbe580
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/// <reference path="fourslash.ts" />

// @strict: true
// @lib: esnext

//// interface ComponentOptions<Props> {
//// setup?: (props: Props) => void;
//// name?: string;
//// }
////
//// interface FunctionalComponent<P> {
//// (props: P): void;
//// }
////
//// type ConcreteComponent<Props> =
//// | ComponentOptions<Props>
//// | FunctionalComponent<Props>;
////
//// type Component<Props = {}> = ConcreteComponent<Props>;
////
//// type WithInstallPlugin = { _prefix?: string };
////
////
//// /**/
//// export function withInstall<C extends Component, T extends WithInstallPlugin>(
//// component: C | C[],
//// target?: T,
//// ): string {
//// const componentWithInstall = (target ?? component) as T;
//// const components = Array.isArray(component) ? component : [component];
////
//// const { name } = components[0];
//// if (name) {
//// return name;
//// }
////
//// return "";
//// }

verify.noErrors();

goTo.marker();
edit.insert("type C = Component['name']");

verify.noErrors();

0 comments on commit 2dbe580

Please sign in to comment.