Add types for nslog 3.0

This commit is contained in:
Daniel Perez Alvarez 2017-07-07 16:57:31 -07:00
parent 338dcf797f
commit 203ec964fd
No known key found for this signature in database
GPG Key ID: D36F1EE02B396949
4 changed files with 39 additions and 0 deletions

12
types/nslog/index.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
// Type definitions for nslog 3.0
// Project: https://github.com/atom/node-nslog
// Definitions by: Daniel Perez Alvarez <https://github.com/unindented>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Outputs a message to the native console.
*/
type NSLog = (...args: any[]) => void;
declare var nslog: NSLog;
export = nslog;

View File

@ -0,0 +1,4 @@
import NSLog = require('nslog');
NSLog('Hello world!');
NSLog('My number is %i and my text is %s.', 42, 'foobar');

22
types/nslog/tsconfig.json Normal file
View File

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

1
types/nslog/tslint.json Normal file
View File

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