I’m creating a library using typescript and pixi.js.
when i build the library i create also all the *.d.ts files and i merge all those files in only one index.d.ts file using “dts-bundle”. the result is this:
// Generated by dts-bundle v0.7.3
// Dependencies for this module:
/// <reference path="../pixi.js" />
declare module LIB{
import { Container } from "pixi.js";
export class BaseContainer extends Container{
constructor();
}
}
inside the library i can use “pixi.js” and all his modules.
the problem occur when i include this index.d.ts file inside another project.
the project see perfectly “BaseContainer” and i can normally create an instance of this class but, when i try to call, for example, the “addChild” method, the compiler give me the error:
Property 'addChild' does not exist on type 'BaseContainer'.
am I doing something wrong?
Thx a lot.
i tried to change some “dts-bundle” configurations and i tried also to change some “tsconfig” props, but nothing change
Romiar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.