-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Typescript type definitions (#28)
* Add TypeScript definitions. * Return the void * Semicolon and docs * Create ILogger interface * Add more loggers * Add TSLint for linting
- Loading branch information
1 parent
2be625c
commit b1aa517
Showing
3 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Type definitions for update-electron-app 1.1.2 | ||
// Project: https://github.com/electron/update-electron-app | ||
// Definitions by: HashimotoYT <[email protected]> | ||
|
||
export function updater( | ||
opts?: { | ||
/** | ||
* @param {String} repo A GitHub repository in the format `owner/repo`. | ||
* Defaults to your `package.json`'s `"repository"` field | ||
*/ | ||
repo?: string; | ||
/** | ||
* @param {String} host Defaults to `https://update.electronjs.org` | ||
*/ | ||
host?: string; | ||
/** | ||
* @param {String} updateInterval How frequently to check for updates. Defaults to `10 minutes`. | ||
* Minimum allowed interval is `5 minutes`. | ||
*/ | ||
updateInterval?: string; | ||
/** | ||
* @param {Object} logger A custom logger object that defines a `log` function. | ||
* Defaults to `console`. See electron-log, a module | ||
* that aggregates logs from main and renderer processes into a single file. | ||
*/ | ||
logger?: ILogger; | ||
}, | ||
): void; | ||
|
||
interface ILogger { | ||
log(message: string): void; | ||
info(message: string): void; | ||
error(message: string): void; | ||
warn(message: string): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"extends": [ | ||
"tslint:recommended" | ||
], | ||
"jsRules": {}, | ||
"rules": {}, | ||
"rulesDirectory": [] | ||
} |