mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #53989 Update branca to v0.4.0 shape by @grempe
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const key = 'supersecretkeyyoushouldnotcommit';
|
||||
const key = '7ed049e344f73f399ba1f7868cf9494f4b13347ecce02a8e463feb32507b73a5';
|
||||
import Branca = require('branca');
|
||||
|
||||
/*
|
||||
|
||||
6
types/branca/index.d.ts
vendored
6
types/branca/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for branca 0.3
|
||||
// Type definitions for branca 0.4
|
||||
// Project: https://github.com/tuupola/branca-js
|
||||
// Definitions by: Brett Cocking <https://github.com/BrettIRL>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -8,11 +8,11 @@
|
||||
export = branca;
|
||||
|
||||
declare class Branca {
|
||||
constructor(key: string);
|
||||
constructor(key: string | Buffer);
|
||||
|
||||
encode(message: string, timestamp?: number): string;
|
||||
decode(token: string, ttl?: number): Buffer;
|
||||
timestamp(token: string): number;
|
||||
}
|
||||
|
||||
declare function branca(key: string): Branca;
|
||||
declare function branca(key: string | Buffer): Branca;
|
||||
|
||||
Reference in New Issue
Block a user