The direct interface to my library is captured by
index.d.ts
which is currently auto-generated from
index.ts
in my package.json file for my project, typings/types properties point to this index.d.ts file, which is to my understanding, how it should be. All good so far.
However, there are some more types that I would like to export from index.d.ts that are not currently expressed in index.d.ts.
For example I have some manually created types in
foo.d.ts
bar.d.ts
and I want these to be expressed in index.d.ts.
The only way I think that might work, is to import the foo.d.ts/bar.d.ts types into index.d.ts and then in turn export them from that file.
However, I am having trouble with that!
Here is what I tried:
// index.ts
import {IBar} from '../bar.d.ts'
import {IFoo} from '../foo.d.ts'
// ... do some stuff with index.ts yadda yadda
export type IBar = IBar; // doesn't seem to work
export interface IFoo = IFoo; // doesn't seem to work
is this possible? How do I do this?