mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Added typings for entities 1.1.1 (#15893)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import * as entities from 'entities';
|
||||
|
||||
// encoding
|
||||
entities.encodeXML(`&`); // `&`
|
||||
entities.encodeHTML(`&`); // `&`
|
||||
|
||||
// decoding
|
||||
entities.decodeXML(`asdf & ÿ ü '`); // `asdf & ÿ ü '`
|
||||
entities.decodeHTML(`asdf & ÿ ü '`); // `asdf & ÿ ü '`
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// Type definitions for entities 1.1
|
||||
// Project: https://github.com/fb55/node-entities
|
||||
// Definitions by: Alice Klipper <https://github.com/aliceklipper>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function decode(data: string, level?: number): string;
|
||||
export function decodeStrict(data: string, level?: number): string;
|
||||
export function encode(data: string, level?: number): string;
|
||||
|
||||
export function decodeXML(str: string): string;
|
||||
export function decodeXMLStrict(str: string): string;
|
||||
export function encodeXML(data: string): string;
|
||||
|
||||
export function decodeHTML(str: string): string;
|
||||
export function decodeHTMLStrict(str: string): string;
|
||||
export function encodeHTML(data: string): string;
|
||||
|
||||
export function decodeHTML4(str: string): string;
|
||||
export function decodeHTML4Strict(str: string): string;
|
||||
export function encodeHTML4(data: string): string;
|
||||
|
||||
export function decodeHTML5(str: string): string;
|
||||
export function decodeHTML5Strict(str: string): string;
|
||||
export function encodeHTML5(data: string): string;
|
||||
|
||||
export function escape(data: string): string;
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"entities-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user