mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Add types for yawn-yaml (#41627)
* Add types for yawn-yaml * PR comments
This commit is contained in:
committed by
Eli Barzilay
parent
3ce8975738
commit
253c9edcff
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
export default class YAWN {
|
||||
constructor(content: string);
|
||||
json: any;
|
||||
yaml: string;
|
||||
getRemark(path: string): string;
|
||||
setRemark(path: string, remark: string): boolean;
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for yawn-yaml 1.4
|
||||
// Project: https://github.com/mohsen1/yawn-yaml#readme
|
||||
// Definitions by: Jamie Magee <https://github.com/JamieMagee>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
export default class YAWN {
|
||||
constructor(content: string);
|
||||
json: any;
|
||||
yaml: string;
|
||||
getRemark(path: string): string;
|
||||
setRemark(path: string, remark: string): boolean;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"yawn-yaml-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -0,0 +1,7 @@
|
||||
import YAML from 'yawn-yaml/cjs';
|
||||
|
||||
const yaml = new YAML(''); // $ExpectType YAWN
|
||||
yaml.json; // $ExpectType any
|
||||
yaml.yaml; // $ExpectType string
|
||||
yaml.getRemark(''); // $ExpectType string
|
||||
yaml.setRemark('', ''); // $ExpectType boolean
|
||||
Reference in New Issue
Block a user