🤖 Merge PR #63518 Add @types/html-entities-decoder by @paikwiki

This commit is contained in:
paikwiki
2022-12-18 19:54:01 +09:00
committed by GitHub
parent 176fe079c3
commit c6ecf8fd1c
4 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import htmlEntitiesDecoder = require('html-entities-decoder');
htmlEntitiesDecoder("1 © 2 &#34"); // $ExpectType string

18
types/html-entities-decoder/index.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
// Type definitions for html-entities-decoder 1.0
// Project: https://github.com/xinglie/html-entities-decoder
// Definitions by: Changhyun Baek <https://github.com/paikwiki>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Decode HTML entity string.
*
* @param str The string should be included encoded HTML entities
* @return The string decoded HTML entities
* @example
* import decode from 'html-entities-decoder'
* const input = '1 &copy; 2 &#34;'
* const output = decode(input) // 1 © 2 "
*/
declare function htmlEntitiesDecoder(str: string): string;
export = htmlEntitiesDecoder;

View 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",
"html-entities-decoder-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "@definitelytyped/dtslint/dt.json" }