mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Move all packages to a types directory
This commit is contained in:
15
types/stringify-object/index.d.ts
vendored
Normal file
15
types/stringify-object/index.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// Type definitions for stringify-object 3.1
|
||||
// Project: https://github.com/yeoman/stringify-object
|
||||
// Definitions by: Chris Khoo <https://github.com/khoomeister>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace stringifyObject { }
|
||||
|
||||
declare function stringifyObject(o: any, options?: {
|
||||
indent?: string,
|
||||
singleQuotes?: boolean,
|
||||
filter?: (o: any, prop: string) => boolean,
|
||||
inlineCharacterLimit?: number
|
||||
}): string;
|
||||
|
||||
export = stringifyObject;
|
||||
26
types/stringify-object/stringify-object-tests.ts
Normal file
26
types/stringify-object/stringify-object-tests.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import * as stringifyObject from 'stringify-object';
|
||||
|
||||
stringifyObject({ a: 1, b: 2, c: 3 });
|
||||
|
||||
stringifyObject('abc', {
|
||||
indent: ' '
|
||||
});
|
||||
|
||||
stringifyObject('123', {
|
||||
indent: ' '
|
||||
});
|
||||
|
||||
stringifyObject(123, {
|
||||
indent: ' ',
|
||||
singleQuotes: false
|
||||
});
|
||||
|
||||
stringifyObject([1, 2, 3], {
|
||||
indent: ' ',
|
||||
singleQuotes: false,
|
||||
inlineCharacterLimit: 12
|
||||
});
|
||||
|
||||
stringifyObject([1, 2, 3], {
|
||||
filter: (o, prop) => prop !== '_hidden_'
|
||||
});
|
||||
22
types/stringify-object/tsconfig.json
Normal file
22
types/stringify-object/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",
|
||||
"stringify-object-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/stringify-object/tslint.json
Normal file
1
types/stringify-object/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Reference in New Issue
Block a user