Skip to content

Commit 2fa2137

Browse files
committed
refactor: show that imports aren't working well
Sadly, we can't do imports without TS screaming bloody murder in Vim: An import path cannot end with a '.d.ts' extension etc Related: microsoft/TypeScript#27481 We can suppress the error, but either way, the editor can't see the types, sadly obviating one of the big upsides of using TypeScript.
1 parent 29c93da commit 2fa2137

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

lib/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// This is only for the benefit of the LanguageClient.
2+
// @ts-ignore
23
import type Deno from '../vendor/deno/types.d.ts';
34

4-
console.log(Deno.args);
5+
// @ts-ignore
6+
import test from './other.ts';
7+
8+
test(Deno.args);

lib/other.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function(args: Array<string>) {
2+
console.log(...args);
3+
}

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"include": ["src/**/*.ts", "vendor/deno/types.d.ts"]
3+
}

0 commit comments

Comments
 (0)