mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add types for nslog 3.0
This commit is contained in:
parent
338dcf797f
commit
203ec964fd
12
types/nslog/index.d.ts
vendored
Normal file
12
types/nslog/index.d.ts
vendored
Normal 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;
|
||||
4
types/nslog/nslog-tests.ts
Normal file
4
types/nslog/nslog-tests.ts
Normal 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
22
types/nslog/tsconfig.json
Normal 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
1
types/nslog/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user