profile
viewpoint

Ask questionsSupport d.ts files

I have a simple example here it's a .js file paired with a d.ts file and deno doesn't throw any type issues where typescript does.

import lodash from './deno_modules/lodash.js'
console.log(lodash.add('2', '2'))

screen shot 2018-12-30 at 11 57 37 pm screen shot 2018-12-30 at 11 57 51 pm

Typescript does throw an issue here when run within the node runtime.

example.ts(2,24): error TS2345: Argument of type '"2"' is not assignable to parameter of type 'number'.

denoland/deno

Answer questions ry

@oldrich-s I think something like that is ideal.

Can it be achieved with triple slash directives?

/// <reference path="path/to/file.d.ts" />
useful!

Related questions

{WSL 2} Permission denied (os error 13) hot 1
gRPC in Deno? hot 1
deno remove/uninstall subcommand hot 1
Insight required: Resource (TCP) errors hot 1
TCP accept loop doesn't use for-await hot 1
Restore runtime lib generation capability hot 1
disable flaky tests _048_media_types_jsx and _019_media_types hot 1
Typescript Custom Transformers Support hot 1
reorg directory structure hot 1
Centos 7 GLIBC_2.18 not found hot 1
"deno ast script.ts" hot 1
Text decoding performance abysmally slow. hot 1
"deno ast script.ts" hot 1
Can't build master hot 1
Can't build master hot 1
Github User Rank List