`typings-new-format` are not being exported by index.d.ts
wes-goulet opened this issue · comments
The type returned by loadSync
is defined in raml-1-parser/dist/typings-new-format/raml.d.ts
. So when I use loadSync
I have the following import at the top of my file:
import { Api10 } from 'raml-1-parser/dist/typings-new-format/spec-1.0/api';
I would much rather just import directly from raml-1-parser
... but this does not work:
import { Api10 } from 'raml-1-parser';
Please update index.d.ts to export the typings-new-format so I don't have to reach into the package to get those types.
Digging into index.ts I found this line:
export import jsonTypings = require("./typings-new-format/raml");
So the types I need are there, just under that jsonTypings
export, I've changed my code to this:
import { jsonTypings } from 'raml-1-parser';
const foo: jsonTypings.api10.Api10 = ...
Which works fine, closing this issue.