Skip to content

Commit

Permalink
refactor: show that imports aren't working well
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wincent committed Mar 18, 2020
1 parent 29c93da commit 2fa2137
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/main.ts
@@ -1,4 +1,8 @@
// This is only for the benefit of the LanguageClient.
// @ts-ignore
import type Deno from '../vendor/deno/types.d.ts';

console.log(Deno.args);
// @ts-ignore
import test from './other.ts';

test(Deno.args);
3 changes: 3 additions & 0 deletions lib/other.ts
@@ -0,0 +1,3 @@
export default function(args: Array<string>) {
console.log(...args);
}
3 changes: 3 additions & 0 deletions tsconfig.json
@@ -0,0 +1,3 @@
{
"include": ["src/**/*.ts", "vendor/deno/types.d.ts"]
}

0 comments on commit 2fa2137

Please sign in to comment.