mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Add type definition for config-yaml
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import yaml = require('config-yaml');
|
||||
|
||||
yaml('./simple.yaml');
|
||||
yaml('./simple.yaml', { encoding: 'gbk' });
|
||||
yaml('./simple.yaml', { encoding: 'utf-8' });
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for config-yaml 1.1
|
||||
// Project: https://github.com/neolao/config-yaml#readme
|
||||
// Definitions by: My Self <https://github.com/me>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
import * as fs from 'fs';
|
||||
|
||||
export = Yaml;
|
||||
|
||||
declare namespace Yaml {
|
||||
interface Options {
|
||||
encoding: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare function Yaml(path: fs.PathLike, options?: Partial<Yaml.Options>): any;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"config-yaml-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user