mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
[string-strip-html] add type definition (#40481)
This commit is contained in:
committed by
Sheetal Nandi
parent
a707b32b0b
commit
c95dfe4932
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
// Type definitions for string-strip-html 4.3
|
||||
// Project: https://gitlab.com/codsen/codsen/tree/master/packages/string-strip-html
|
||||
// Definitions by: Chris Shaw <https://github.com/chris-shaw-2011>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function stringStripHtml(str: string, originalOpts?: Options): string;
|
||||
|
||||
interface Options {
|
||||
ignoreTags?: string[];
|
||||
onlyStripTags?: string[];
|
||||
stripTogetherWithTheirContents?: string[] | false;
|
||||
skipHtmlDecoding?: boolean;
|
||||
returnRangeOnly?: boolean;
|
||||
trimOnlySpaces?: boolean;
|
||||
dumpLinkHrefsNearby?: DumpLinkHrefsNearby | false;
|
||||
}
|
||||
|
||||
interface DumpLinkHrefsNearby {
|
||||
enabled?: boolean;
|
||||
putOnNewLine?: boolean;
|
||||
wrapHeads?: string;
|
||||
wrapTails?: string;
|
||||
}
|
||||
|
||||
export = stringStripHtml;
|
||||
@@ -0,0 +1,5 @@
|
||||
import stringStripHtml = require("string-strip-html");
|
||||
|
||||
stringStripHtml("");
|
||||
stringStripHtml("", {});
|
||||
stringStripHtml("", { dumpLinkHrefsNearby: {} });
|
||||
@@ -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",
|
||||
"string-strip-html-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user