mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[@wordpress/html-entities] add new definitions (#35879)
This commit is contained in:
parent
05a805867b
commit
063fc9d608
9
types/wordpress__html-entities/index.d.ts
vendored
Normal file
9
types/wordpress__html-entities/index.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Type definitions for @wordpress/html-entities 2.3
|
||||
// Project: https://github.com/WordPress/gutenberg/tree/master/packages/html-entities/README.md
|
||||
// Definitions by: Derek Sifford <https://github.com/dsifford>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Decodes the HTML entities from a given string.
|
||||
*/
|
||||
export function decodeEntities(html: string): string;
|
||||
19
types/wordpress__html-entities/tsconfig.json
Normal file
19
types/wordpress__html-entities/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@wordpress/html-entities": ["wordpress__html-entities"]
|
||||
}
|
||||
},
|
||||
"files": ["index.d.ts", "wordpress__html-entities-tests.ts"]
|
||||
}
|
||||
1
types/wordpress__html-entities/tslint.json
Normal file
1
types/wordpress__html-entities/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -0,0 +1,3 @@
|
||||
import { decodeEntities } from "@wordpress/html-entities";
|
||||
|
||||
decodeEntities("á"); // "á"
|
||||
Loading…
Reference in New Issue
Block a user