-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
298 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
///<reference path="fourslash.ts"/> | ||
|
||
// @Filename: /first.ts | ||
//// export function foo() { | ||
//// return 1; | ||
//// } | ||
//// export function bar() { | ||
//// return 2; | ||
//// } | ||
|
||
// @Filename: /index.ts | ||
//// import { foo } from "./first"; | ||
//// import { bar } from './first'; | ||
//// console.log(foo() + bar()) | ||
|
||
verify.getImports('/index.ts', ['/first.ts']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
///<reference path="fourslash.ts"/> | ||
|
||
// @Filename: /first.ts | ||
//// export function foo() { | ||
//// return 1; | ||
//// } | ||
// @Filename: /index.ts | ||
//// let bar: typeof import('./first').foo = function bar() { | ||
//// return 2; | ||
//// } | ||
|
||
verify.getImports('/index.ts', ['/first.ts']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
///<reference path="fourslash.ts"/> | ||
|
||
// @strict: true | ||
// @jsx: react-jsx | ||
// @jsxImportSource: preact | ||
// @filename: /node_modules/preact/index.d.ts | ||
//// type Defaultize<Props, Defaults> = | ||
//// // Distribute over unions | ||
//// Props extends any // Make any properties included in Default optional | ||
//// ? Partial<Pick<Props, Extract<keyof Props, keyof Defaults>>> & | ||
//// // Include the remaining properties from Props | ||
//// Pick<Props, Exclude<keyof Props, keyof Defaults>> | ||
//// : never; | ||
//// export namespace JSXInternal { | ||
//// interface HTMLAttributes<T = {}> { } | ||
//// interface SVGAttributes<T = {}> { } | ||
//// type LibraryManagedAttributes<Component, Props> = Component extends { | ||
//// defaultProps: infer Defaults; | ||
//// } | ||
//// ? Defaultize<Props, Defaults> | ||
//// : Props; | ||
//// | ||
//// interface IntrinsicAttributes { | ||
//// key?: any; | ||
//// } | ||
//// | ||
//// interface Element extends VNode<any> { } | ||
//// | ||
//// interface ElementClass extends Component<any, any> { } | ||
//// | ||
//// interface ElementAttributesProperty { | ||
//// props: any; | ||
//// } | ||
//// | ||
//// interface ElementChildrenAttribute { | ||
//// children: any; | ||
//// } | ||
//// | ||
//// interface IntrinsicElements { | ||
//// div: HTMLAttributes; | ||
//// } | ||
//// } | ||
//// export const Fragment: unique symbol; | ||
//// export type ComponentType<T = {}> = {}; | ||
//// export type ComponentChild = {}; | ||
//// export type ComponentChildren = {}; | ||
//// export type VNode<T = {}> = {}; | ||
//// export type Attributes = {}; | ||
//// export type Component<T = {}, U = {}> = {}; | ||
// @filename: /node_modules/preact/jsx-runtime/index.d.ts | ||
//// export { Fragment } from '..'; | ||
//// import { | ||
//// ComponentType, | ||
//// ComponentChild, | ||
//// ComponentChildren, | ||
//// VNode, | ||
//// Attributes | ||
//// } from '..'; | ||
//// import { JSXInternal } from '..'; | ||
//// | ||
//// export function jsx( | ||
//// type: string, | ||
//// props: JSXInternal.HTMLAttributes & | ||
//// JSXInternal.SVGAttributes & | ||
//// Record<string, any> & { children?: ComponentChild }, | ||
//// key?: string | ||
//// ): VNode<any>; | ||
//// export function jsx<P>( | ||
//// type: ComponentType<P>, | ||
//// props: Attributes & P & { children?: ComponentChild }, | ||
//// key?: string | ||
//// ): VNode<any>; | ||
//// | ||
//// | ||
//// export function jsxs( | ||
//// type: string, | ||
//// props: JSXInternal.HTMLAttributes & | ||
//// JSXInternal.SVGAttributes & | ||
//// Record<string, any> & { children?: ComponentChild[] }, | ||
//// key?: string | ||
//// ): VNode<any>; | ||
//// export function jsxs<P>( | ||
//// type: ComponentType<P>, | ||
//// props: Attributes & P & { children?: ComponentChild[] }, | ||
//// key?: string | ||
//// ): VNode<any>; | ||
//// | ||
//// | ||
//// export function jsxDEV( | ||
//// type: string, | ||
//// props: JSXInternal.HTMLAttributes & | ||
//// JSXInternal.SVGAttributes & | ||
//// Record<string, any> & { children?: ComponentChildren }, | ||
//// key?: string | ||
//// ): VNode<any>; | ||
//// export function jsxDEV<P>( | ||
//// type: ComponentType<P>, | ||
//// props: Attributes & P & { children?: ComponentChildren }, | ||
//// key?: string | ||
//// ): VNode<any>; | ||
//// | ||
//// export import JSX = JSXInternal; | ||
//// | ||
// @filename: /index.tsx | ||
//// export const Comp = () => <div></div>; | ||
|
||
verify.noErrors() | ||
verify.getImports('/index.tsx', []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
///<reference path="fourslash.ts"/> | ||
|
||
// @Filename: /index.ts | ||
//// function foo() { | ||
//// return 1; | ||
//// } | ||
//// function bar() { | ||
//// return 2; | ||
//// } | ||
//// | ||
|
||
verify.getImports('/index.ts', []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
///<reference path="fourslash.ts"/> | ||
|
||
// @Filename: /first.ts | ||
//// export function foo() { | ||
//// return 1; | ||
//// } | ||
// @Filename: /index.ts | ||
//// import { foo } from "./first"; | ||
//// function bar() { | ||
//// return 2; | ||
//// } | ||
//// | ||
|
||
verify.getImports('/index.ts', ['/first.ts']) |
Oops, something went wrong.