Skip to content

Commit

Permalink
Bugfix: typescript not compiling, wrong type definition file.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
prene committed May 1, 2020
1 parent 49fe49f commit d66cf4c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions DynamicKey/AgoraDynamicKey/nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d66cf4c

Please sign in to comment.