mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #61418 Add types for 'css.escape' v1.5 by @mihnea-s
This commit is contained in:
13
types/css.escape/css.escape-tests.ts
Normal file
13
types/css.escape/css.escape-tests.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import cssEscape = require('css.escape');
|
||||
|
||||
// $ExpectType string
|
||||
cssEscape('--string');
|
||||
|
||||
// @ts-expect-error
|
||||
cssEscape({});
|
||||
|
||||
// $ExpectType string
|
||||
CSS.escape('');
|
||||
|
||||
// @ts-expect-error
|
||||
CSS.escape({});
|
||||
16
types/css.escape/index.d.ts
vendored
Normal file
16
types/css.escape/index.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for css.escape 1.5
|
||||
// Project: https://github.com/mathiasbynens/CSS.escape
|
||||
// Definitions by: Mihnea Stoian <https://github.com/mihnea-s>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare global {
|
||||
const CSS: {
|
||||
/**
|
||||
* A robust polyfill for the `CSS.escape` utility method as defined in
|
||||
* [CSSOM](https://drafts.csswg.org/cssom/#the-css.escape()-method).
|
||||
*/
|
||||
escape(css: string): string;
|
||||
};
|
||||
}
|
||||
|
||||
export = CSS.escape;
|
||||
23
types/css.escape/tsconfig.json
Normal file
23
types/css.escape/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",
|
||||
"css.escape-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/css.escape/tslint.json
Normal file
1
types/css.escape/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "@definitelytyped/dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user