Closed G-Rath closed 5 years ago
Out of scope repo, please use https://github.com/DefinitelyTyped/DefinitelyTyped for types
Seems strange that it's not out of scope for the json5-loader
repo, but to each his own.
I'll try and make a PR somewhere when I get the time.
I created a PR for definitions to DT: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38229
I'll create definitions for the other loaders once that is accepted, since they'll be pretty much the same.
Documentation Is:
Please Explain in Detail...
This package uses an options object for configuration, that has a series of properties that are required to be of specific types to function correctly.
This options object is not defined in a typed manner that can be used to strongly type objects in typescript.
Your Proposal for Changes
Create an
index.d.ts
file with anOptions
interface.This is a pretty minor issue, and mainly for ease-of-use rather than actually needed.
By having a
.d.ts
file with such an interface, you'd be able to more accurate in TypeScript, and in Javascript via jsdoc, like so:and
Given how well written the documentation is on the options, this should be pretty easy. I'm willing to give it a go myself when I have some free time.