TS interfaces?
See original GitHub issueExpected Behaviour
I wonder why this module doesn’t export any TS interfaces (LoaderOptions).
import { LoaderOptions } from 'ts-loader'
Actual Behaviour
Just js code.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Handbook - Interfaces - TypeScript
Interfaces are capable of describing the wide range of shapes that JavaScript objects can take. In addition to describing an object with properties,...
Read more >TypeScript Interfaces - TutorialsTeacher
Interface is a structure that defines the contract in your application. It defines the syntax for classes to follow. Classes that are derived...
Read more >Understanding and using interfaces in TypeScript
TypeScript has inbuilt support for interfaces. An interface defines the specifications of an entity. It lays out the contract that states what ...
Read more >TypeScript - Interfaces - Tutorialspoint
An interface is a syntactical contract that an entity should conform to. In other words, an interface defines the syntax that any entity...
Read more >A Simple Guide to Typescript Interfaces: declaration & use cases
In TypeScript, an interface is an abstract type that tells the compiler which property names a given object can have.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So I think it’s as simple as adding
declaration: true
to thetsconfig.json
. Want to try and report back? If it’s just that then pr with that change and we’re done!Heyo! I have the same problem. I’m using awesome latest TS 2.9 for type checking js files and with that having type safe configs for webpack, jest etc. right now I have to write my own ambient type definitions for
interface LoaderOptions
webpack.config.js
instead I would like to use definitions, which you already have in codebase, just need to be shipped as ambient types with your package. I’m definitely up to sending a PR, if you can point me in right direction.
cheers !