У меня проблемы с созданием соответствующего объявления машинописного текста для следующего js кода:
class Ping {
ping() {
console.log("PING");
}
}
class Pong {
pong() {
console.log("PONG");
}
}
Ping.Pong = Pong;
exports.Ping = Ping;
Я пробовал до сих пор:
export declare class Ping extends Ping.Pong {
ping();
}
declare namespace Ping {
class Pong {
pong();
}
}
Но это не работает с:
- error TS2395: Individual declarations in merged declaration 'Ping' must be all exported or all local.
1 export declare class Ping implements Ping.Pong {