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!
source:https://uonfu.com/
Github User Rank List