mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Adds type definitions for 'valid-data-url' (#36158)
Adds type definitions and tests Adds tsconfig and tslint config
This commit is contained in:
parent
5749a49e50
commit
79f6b71c16
13
types/valid-data-url/index.d.ts
vendored
Normal file
13
types/valid-data-url/index.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
// Type definitions for valid-data-url 2.0
|
||||
// Project: https://github.com/killmenot/valid-data-url
|
||||
// Definitions by: jgeth <https://github.com/jgeth>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export as namespace validDataUrl;
|
||||
|
||||
declare const validDataUrl: {
|
||||
(candidate: string): boolean;
|
||||
regex: RegExp;
|
||||
};
|
||||
|
||||
export = validDataUrl;
|
||||
23
types/valid-data-url/tsconfig.json
Normal file
23
types/valid-data-url/tsconfig.json
Normal file
@ -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",
|
||||
"valid-data-url-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/valid-data-url/tslint.json
Normal file
1
types/valid-data-url/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
3
types/valid-data-url/valid-data-url-tests.ts
Normal file
3
types/valid-data-url/valid-data-url-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as validDataUrl from "valid-data-url";
|
||||
|
||||
validDataUrl("data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D");
|
||||
Loading…
Reference in New Issue
Block a user