mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
🤖 Merge PR #54859 Added Types for Package esutils by @rhythmbhiwani
* Added Types for esutils package * Added Types to package esutils * Removed Unwanted Whitespace
This commit is contained in:
3
types/esutils/esutils-tests.ts
Normal file
3
types/esutils/esutils-tests.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as esutils from 'esutils';
|
||||
|
||||
esutils.code.isDecimalDigit(599.05);
|
||||
41
types/esutils/index.d.ts
vendored
Normal file
41
types/esutils/index.d.ts
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
// Type definitions for esutils 2.0
|
||||
// Project: https://github.com/estools/esutils
|
||||
// Definitions by: Rhythm Bhiwani <https://github.com/rhythmbhiwani>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = esutils;
|
||||
|
||||
declare const esutils: {
|
||||
ast: {
|
||||
isExpression: (node: any) => boolean;
|
||||
isIterationStatement: (node: any) => boolean;
|
||||
isProblematicIfStatement: (node: any) => boolean;
|
||||
isSourceElement: (node: any) => boolean;
|
||||
isStatement: (node: any) => boolean;
|
||||
trailingStatement: any;
|
||||
};
|
||||
code: {
|
||||
isDecimalDigit: (ch: any) => boolean;
|
||||
isHexDigit: (ch: any) => boolean;
|
||||
isIdentifierPartES5: (ch: any) => boolean;
|
||||
isIdentifierPartES6: (ch: any) => boolean;
|
||||
isIdentifierStartES5: (ch: any) => boolean;
|
||||
isIdentifierStartES6: (ch: any) => boolean;
|
||||
isLineTerminator: (ch: any) => boolean;
|
||||
isOctalDigit: (ch: any) => boolean;
|
||||
isWhiteSpace: (ch: any) => boolean;
|
||||
};
|
||||
keyword: {
|
||||
isStrictModeReservedWordES6: (id: any) => boolean;
|
||||
isIdentifierES5: (id: any, strict: any) => boolean;
|
||||
isIdentifierES6: (id: any, strict: any) => boolean;
|
||||
isIdentifierNameES5: (id: any) => boolean;
|
||||
isIdentifierNameES6: (id: any) => boolean;
|
||||
isKeywordES5: (id: any, strict: any) => boolean;
|
||||
isKeywordES6: (id: any, strict: any) => boolean;
|
||||
decodeUtf16: (lead: any, trail: any) => any;
|
||||
isReservedWordES5: (id: any, strict: any) => boolean;
|
||||
isReservedWordES6: (id: any, strict: any) => boolean;
|
||||
isRestrictedWord: (id: any) => boolean;
|
||||
};
|
||||
};
|
||||
23
types/esutils/tsconfig.json
Normal file
23
types/esutils/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",
|
||||
"esutils-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/esutils/tslint.json
Normal file
1
types/esutils/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user