-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ~ remove
/// <reference path...
references to deno types
## [why] Deno barfs to a halt with type conflict errors when it's not exactly in sync with the otherwise referenced types, which is not controllable by the repository. So, remove any references to Deno types from the TS files. Intellisense is broken by this but the code will now run. Both the built-in JS/TS plugin (vscode.typescript-language-features) and the Deno-specific plugin (denoland.vscode-deno) are currently unable to understand and work within a mixed repository. Await better tooling.
- Loading branch information
Showing
2 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
// spell-checker:ignore Deno | ||
|
||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference | ||
/// <reference path="../types/deno.d.ts"/> | ||
|
||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
import * as path from 'https://deno.land/std@0.81.0/path/mod.ts'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
/* eslint-disable @typescript-eslint/ban-ts-comment */ | ||
|
||
// @ts-ignore | ||
import { Platform } from './_base.ts'; | ||
|
||
// create a local reference to refer to `Deno` (for better linting without need for multiple `// @ts-ignore` directives) | ||
// @ts-ignore | ||
const deno = Deno; | ||
|
||
export const adapter: Platform.Adapter = { | ||
env: { get: Deno.env.get }, | ||
env: { get: deno.env.get }, | ||
// Deno (as of v1.6) has no built-in implementation for homedir() or tmpdir() | ||
os: {}, // * module is tolerant of missing homedir()/tmpdir() functions | ||
meta: { mainFilename: Deno.mainModule }, | ||
meta: { mainFilename: deno.mainModule }, | ||
path, | ||
process: { platform: Deno.build.os }, | ||
process: { platform: deno.build.os }, | ||
}; | ||
|
||
/* eslint-enable @typescript-eslint/ban-ts-comment */ |