fix(client): fixed typings
This commit is contained in:
parent
78aae6ac78
commit
2eb4d307cb
1 changed files with 2 additions and 16 deletions
|
@ -1,17 +1,3 @@
|
|||
module.exports = ({ fs, path, outDir }) => ({
|
||||
module.exports = {
|
||||
esmOnlyDirectives: true,
|
||||
final() {
|
||||
function fixClient(file) {
|
||||
// make TelegramClient a class, not an interface
|
||||
const dTsContent = fs.readFileSync(path.join(outDir, file), 'utf8')
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(outDir, file),
|
||||
dTsContent.replace('export interface TelegramClient', 'export class TelegramClient'),
|
||||
)
|
||||
}
|
||||
|
||||
fixClient('esm/client.d.ts')
|
||||
fixClient('cjs/client.d.ts')
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue