Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ var extensions = {
);
},
},
'tsx/dist/cjs/index.cjs',
],
'.cts': ['ts-node/register'],
'.tsx': [
Expand Down Expand Up @@ -498,6 +499,7 @@ var extensions = {
);
},
},
'tsx/dist/cjs/index.cjs',
],
'.yaml': 'yaml-hook/register',
'.yml': 'yaml-hook/register',
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/ts/5/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"tsx": "^4.7.0"
}
}
15 changes: 15 additions & 0 deletions test/fixtures/ts/5/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var test = {
data: {
trueKey: true,
falseKey: false,
subKey: {
subProp: 1,
},
},
};

var main = {
default: test,
};

export = main;
13 changes: 13 additions & 0 deletions test/fixtures/tsx/5/data.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const data: {
trueKey: boolean
falseKey: boolean
subKey: {
subProp: number
}
} = {
trueKey: true,
falseKey: false,
subKey: {
subProp: 1
}
}
5 changes: 5 additions & 0 deletions test/fixtures/tsx/5/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"tsx": "^4.7.0"
}
}
11 changes: 11 additions & 0 deletions test/fixtures/tsx/5/test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @jsx jsx */

import { data } from './data'

const Component = (props: object) => ({ data: props })

function jsx (element: typeof Component, props: object) {
return element(props)
}

export default <Component {...data} />
1 change: 1 addition & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ describe('interpret.extensions', function () {
this.skip();
}

// if (name === '')
this.timeout(0);

var expected;
Expand Down