Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,7 @@ function lowerStatement(
return;
}
case "TypeAlias":
case "TSInterfaceDeclaration":
case "TSTypeAliasDeclaration": {
// We do not preserve type annotations/syntax through transformation
return;
Expand All @@ -1358,7 +1359,6 @@ function lowerStatement(
case "TSEnumDeclaration":
case "TSExportAssignment":
case "TSImportEqualsDeclaration":
case "TSInterfaceDeclaration":
case "TSModuleDeclaration":
case "TSNamespaceExportDeclaration":
case "WithStatement": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

## Input

```javascript
function Foo() {
type X = number;
interface Bar {
baz: number;
}
return 0;
}

export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [],
};

```

## Code

```javascript
function Foo() {
return 0;
}

export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [],
};

```

### Eval output
(kind: ok) 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function Foo() {
type X = number;
interface Bar {
baz: number;
}
return 0;
}

export const FIXTURE_ENTRYPOINT = {
fn: Foo,
params: [],
};