UNPKG

@masknet/eslint-plugin

Version:
17 lines 951 B
import type { SourceCode } from '@typescript-eslint/utils/ts-eslint'; import type { Scope } from '@typescript-eslint/scope-manager'; export type Predicate<T> = (value: T) => boolean; export declare function wrap<T, R = T>(input: T, callback: (input: T) => R): R; export declare function quote(input: string): string; export declare function isValidVariableName(input: string): boolean; export declare function property(name: string): string; export declare function findLastIndex<T>(elements: T[], predicate: Predicate<T>): number; /** ----- ESLint Helper ----- */ /** * `context.sourceCode.getScope()` requires at least one argument, no-argument usage (global scope) * is no longer supported. * * https://github.com/ota-meshi/eslint-compat-utils/blob/96387ca53dc08306d773c33b3b003582721084a1/src/get-source-code.ts#L36 */ export declare function getGlobalScope(sourceCode: Readonly<SourceCode>): Scope | null; //# sourceMappingURL=utils.d.ts.map