Skip to content

Commit 455f243

Browse files
committed
Merge branch 'master' of github.com:deepkit/deepkit-framework
2 parents 423594e + aadc4b9 commit 455f243

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

packages/type-compiler/deepkit-type-install.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env node
12

23
try {
34
require('./dist/cjs/install-transformer.js');

packages/type-compiler/tests/transpile.spec.ts

+17
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,23 @@ test('keep "use x" at top', () => {
448448
expect(res.app.startsWith('"use client";')).toBe(true);
449449
});
450450

451+
test('inline type definitions should compile', () => {
452+
const res = transpile({
453+
'app': `
454+
function testFn<
455+
T extends ClassType<any>,
456+
Prop extends keyof InstanceType<T>
457+
>(options: {
458+
type: T;
459+
props: Prop[];
460+
}) {
461+
type R = Pick<InstanceType<Schema>, Prop>;
462+
}
463+
`
464+
});
465+
console.log(res);
466+
});
467+
451468
test('class typeName', () => {
452469
const res = transpile({
453470
'app': `

0 commit comments

Comments
 (0)