How does TypeScript extend the declaration file. D.ts?

install konva, with npm install and find that the declaration file konva.d.ts that comes with it does not contain the class Transformer, that you want to extend. Do not want to modify the konva.d.ts file directly in node_module, how to expand it?

Mar.04,2021

you can try this tool dtsmake js to generate d.ts

npm i dtsmake-g

github address


create a new .d.ts file with an arbitrary name. The contents of the file are as follows

declare namespace Konva{
    export class Transformer {
        // 
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf6a2e-3136f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf6a2e-3136f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?