Added type definitions for node browser history (#43377)

* Added type definitions for node browser history

* renamed definition file

* added tsconfig and tslint files

* updated typings file

* removed redundant types and updated typings

* removed redundant types and updated typings

* updated any type with an interface
This commit is contained in:
Arindam Dawn 2020-03-26 16:04:40 +00:00 committed by GitHub
parent f4073ff58a
commit 2e7835106b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 0 deletions

22
types/node-browser-history/index.d.ts vendored Normal file
View File

@ -0,0 +1,22 @@
// Type definitions for node-browser-history 1.0
// Project: https://github.com/MyOutDeskLLC/node-browser-history
// Definitions by: Arindam Dawn <https://github.com/arindamdawn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface BrowserHistory {
browser: string;
title: string;
url: string;
utc_time: number;
}
export function getAllHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getFirefoxHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getSeaMonkeyHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getChromeHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getOperaHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getTorchHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getSafariHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getMaxthonHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getVivaldiHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;
export function getIEHistory(historyTimeLength?: number): Promise<BrowserHistory[]>;

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }