I have a javascript library which has a type definition file here: https://github.com/tyranid-org/tyranid/blob/master/tyranid.d.ts which is exposed via the typings
The following ended up working...
in node_modules/tyranid/tyranid.d.ts:
export = Tyr // must do "import * as Tyr from 'tyranid'" instead of default
declare namespace Tyr {
export interface Document {
// original definition...
}
}
in mylib/tyranid-extensions.d.ts...
declare module "tyranid" {
interface Document {
addedMethod(): boolean;
}
}
Thanks @pelle-jacobs for the help!