mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 22:01:08 +08:00
Merge pull request #8121 from vangorra/meteor-persistent-session
Adding support for meteor-persistant-session.
This commit is contained in:
19
meteor-persistent-session/meteor-persistent-session-tests.ts
Normal file
19
meteor-persistent-session/meteor-persistent-session-tests.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/// <reference path="meteor-persistent-session.d.ts" />
|
||||
|
||||
Session.setTemp('a', 'a');
|
||||
Session.setPersistent('a', 'a');
|
||||
Session.setAuth('a', 'a');
|
||||
|
||||
Session.setDefaultTemp('a', 'a');
|
||||
Session.setDefaultPersistent('a', 'a');
|
||||
Session.setDefaultAuth('a', 'a');
|
||||
|
||||
Session.makeTemp('a');
|
||||
Session.makePersistent('a');
|
||||
Session.makeAuth('a');
|
||||
|
||||
Session.clear();
|
||||
Session.clear('a');
|
||||
Session.clearTemp();
|
||||
Session.clearPersistent();
|
||||
Session.clearAuth();
|
||||
26
meteor-persistent-session/meteor-persistent-session.d.ts
vendored
Normal file
26
meteor-persistent-session/meteor-persistent-session.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Type definitions for u2622:persistent-session
|
||||
// Project: https://github.com/okgrow/meteor-persistent-session
|
||||
// Definitions by: Robbie Van Gorkom <https://github.com/vangorra>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../meteor/meteor.d.ts" />
|
||||
|
||||
declare module Session {
|
||||
function setTemp(key: string, value: string | number | boolean | any /** Null **/ | any /** Undefined **/): boolean;
|
||||
function setPersistent(key: string, value: string | number | boolean | any /** Null **/ | any /** Undefined **/): boolean;
|
||||
function setAuth(key: string, value: string | number | boolean | any /** Null **/ | any /** Undefined **/): boolean;
|
||||
|
||||
function setDefaultTemp(key: string, value: EJSONable | any /** Undefined **/): void;
|
||||
function setDefaultPersistent(key: string, value: EJSONable | any /** Undefined **/): void;
|
||||
function setDefaultAuth(key: string, value: EJSONable | any /** Undefined **/): void;
|
||||
|
||||
function makeTemp(key: string) : void;
|
||||
function makePersistent(key: string) : void;
|
||||
function makeAuth(key: string) : void;
|
||||
|
||||
function clear() : void;
|
||||
function clear(key: string) : void;
|
||||
function clearTemp() : void;
|
||||
function clearPersistent() : void;
|
||||
function clearAuth() : void;
|
||||
}
|
||||
Reference in New Issue
Block a user