definitelytyped Questions
4
Solved
In my Angular 8 TypeScript code I was importing lodash directy (e.g. import * as _ from 'lodash';). In my package.json I had "lodash": "^4.17.15".
I decided to install the @types/lodash-es module ...
Hubblebubble asked 2/1, 2020 at 15:25
6
Solved
Let's suppose there's a typing file for library X which includes some interfaces.
interface I1 {
x: any;
}
interface I2 {
y: {
a: I1,
b: I1,
c: I1
}
z: any
}
In order to work with this li...
Meingoldas asked 30/3, 2016 at 14:6
4
Solved
I am new to typescript and experimenting with porting an express app to use typescript. The server uses JWTs for authentication/authorisation and I have a utility function that decodes and verifies...
Graner asked 16/7, 2021 at 5:35
2
Solved
I'm stuck and looking for help.
I'm not sure where the problem actually is but I hope to find the answer. 🙂
Problem details
I've installed '@types/lodash' using following command:
npm install ...
Braiding asked 8/1, 2017 at 6:44
1
Context
I'm making a React renderer for NativeScript (i.e. a library that allows you to declare NativeScript UIs using React), and I want to provide typings for it.
React's typings already fully ...
Wouldbe asked 14/4, 2019 at 13:9
2
For packages that don't come with it's own types, next step is to look for @types/<package> for the package typings. However, if there is a package X, which is forked to a package Y. How can ...
Within asked 11/11, 2020 at 10:56
3
Solved
I've installed @types/chrome and add it in tsconfig.app.json
"types": [
"chrome"
]
But when i use chrome.app in component, it show an error:
Property 'app' does not exist on type 'typeof chr...
Ferretti asked 27/4, 2017 at 10:25
6
Solved
From the documentation, Next.js 5.0 announcement and various articles around on the internet it seems like Next.js supports TypeScript well and many people are using it.
But these threads suggest ...
Suhail asked 19/4, 2018 at 19:58
24
Solved
I am trying to get my first TypeScript and DefinitelyTyped Node.js application up and running, and running into some errors.
I am getting the error "TS2304: Cannot find name 'require' " when I att...
Klina asked 2/7, 2015 at 0:21
4
In the Typescript definition file (DefinitelyTyped) I am examining, there is an interface, a function and a namespace all with the exact same name: twilio.
Here is the sample, from the first few li...
Orton asked 18/1, 2018 at 5:44
5
I'm rather new to using TypeScript and Webpack and unfortunately keep running into an issue with my type declarations that I just cant seem to resolve.
To put it simply my project is a ASP.NET MVC...
Piscatelli asked 31/8, 2018 at 3:17
2
I am working on a ChanceJS mixin that I plan to distribute via npm.
I am having issues trying to get the correct Interface and Typings defined.
Example of the package: // index.ts
import * as Ch...
Statue asked 7/5, 2018 at 19:20
5
Solved
DefinitelyTyped has provided a underscore declaration file, which defines a List interface, and used it heavily in the code.
// Common interface between Arrays and jQuery objects
interface List {
...
Leelah asked 29/1, 2013 at 14:33
1
Solved
The tsc compiler always happily compiles console.log("foo"). Where is the variable console declared? The compiler accepts this program even with all libs turned off in my tsconfig.json. S...
Granulocyte asked 3/10, 2020 at 15:15
2
Solved
I try to use commander in typescript and I could like to give a proper type to my cli. So I start with this code:
import * as program from "commander";
const cli = program
.version("1.0.0")
.us...
Queenie asked 5/5, 2017 at 6:23
2
Solved
I have javascript library with types from npm/@types.
I need to make two fixes to @types which applies only in case of my application, so I can't merge them into DefinitelyTyped repository.
I ne...
Rumney asked 12/1, 2018 at 17:40
0
I'm using react-native 0.59.9 (can't yet upgrade to 0.60.x because of external blockers).
But the @types/react-native only provides type-definitions up to 0.57.65 (as listed in npm). From then on ...
Cider asked 27/9, 2019 at 12:7
2
Solved
I've installed @types/stripe-v3 and included Stripe's javascript file in a script tag in index.html. Supposedly the Angular compiler should include all files automagically from the @types node modu...
Mccarter asked 18/2, 2019 at 18:33
1
Solved
I published two Javascript libraries on npm and users have asked for TypeScript type definitions for both of them. I don't use TypeScript myself and I have no plans to rewrite those libraries in Ty...
Endoscope asked 1/7, 2019 at 10:37
2
Solved
DefinitelyTyped has type definitions for many libraries, but often enough I cannot find a good way to use them when the Javascript implementation is separated from the Typescript, like when a libra...
Bork asked 21/4, 2019 at 0:37
1
Solved
I am creating a package that I intend to publish to NPM. I am writing the package in typescript, and have my tsconfig file set up to emit the typescript declaration file along with the compiled jav...
Gaussmeter asked 28/2, 2019 at 13:1
2
Solved
I see "DefinitelyTyped" is something related to TypeScript/JavaScript development, but I couldn't understand its use or some code sample to understand about it.
I looked at
http://definitelytyped...
Inclination asked 6/10, 2016 at 23:27
3
The React team announced that since React 16:
You can now return an array of elements from a component’s render method.
This works in typescript for regular class components, but I cannot get ...
Cronus asked 12/10, 2017 at 12:36
3
Context
I forked DefinitelyTyped and made a workaround to one type definition. This workaround is on a branch in this fork.
This change shouldn't be merged back, since it's only a temporary worka...
Neiman asked 4/7, 2018 at 7:20
1
I'm just started using node and wanted to try it with typescript. I did an npm install @types/node and the latest version was 7.0.4:
$ npm install @types/node
[email protected] /home/wink/prg...
Detrain asked 4/2, 2017 at 0:47
1 Next >
© 2022 - 2024 — McMap. All rights reserved.