-
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ast): add some visitor functions
- Loading branch information
Showing
4 changed files
with
93 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
7 changes: 7 additions & 0 deletions
7
crates/oxc_isolated_declarations/tests/fixtures/eliminate-imports.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,7 @@ | ||
import { AExtend, BExtend, Type, CImplements, CType, ThisType1, ThisType2, Unused } from 'mod'; | ||
|
||
export interface A extends AExtend<Type> {} | ||
export class B extends BExtend<Type> {} | ||
export class C implements CImplements<CType> {} | ||
export function foo(this: ThisType1): void {} | ||
export const bar: (this: ThisType2) => void = function() {} |
12 changes: 12 additions & 0 deletions
12
crates/oxc_isolated_declarations/tests/snapshots/eliminate-imports.snap
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 @@ | ||
--- | ||
source: crates/oxc_isolated_declarations/tests/mod.rs | ||
input_file: crates/oxc_isolated_declarations/tests/fixtures/eliminate-imports.ts | ||
--- | ||
==================== .D.TS ==================== | ||
|
||
import { AExtend, BExtend, Type, CImplements, CType, ThisType1, ThisType2 } from 'mod'; | ||
export interface A extends AExtend<Type> {} | ||
export declare class B extends BExtend {} | ||
export declare class C {} | ||
export declare function foo(): void; | ||
export declare const bar: (this:ThisType2 ) => void; |