From d66cf4cb102541ce5b9d7e4cfd697677c86f4869 Mon Sep 17 00:00:00 2001 From: prene Date: Fri, 1 May 2020 16:36:52 +0200 Subject: [PATCH] Bugfix: typescript not compiling, wrong type definition file. Compiling any ts project that uses the agora-access-token module fails with `TS1036: Statements are not allowed in ambient contexts.` and `TS2304: Cannot find name 'Role'` Reason was a faulty index.d.ts. Seems like some copy-paste left overs. --- DynamicKey/AgoraDynamicKey/nodejs/index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/DynamicKey/AgoraDynamicKey/nodejs/index.d.ts b/DynamicKey/AgoraDynamicKey/nodejs/index.d.ts index 4d7642fc..547a50c3 100644 --- a/DynamicKey/AgoraDynamicKey/nodejs/index.d.ts +++ b/DynamicKey/AgoraDynamicKey/nodejs/index.d.ts @@ -86,7 +86,4 @@ export namespace RtmTokenBuilder { * @return token */ export function buildToken(appID: string, appCertificate: string, account: string | number, role: number, privilegeExpiredTs: number): string; -} - -module.exports.RtmTokenBuilder = RtmTokenBuilder -module.exports.Role = Role \ No newline at end of file +} \ No newline at end of file