forked from AnYiEE/touhou-mystia-izakaya-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
33 lines (28 loc) · 1.2 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
declare module '@eslint-community/eslint-plugin-eslint-comments/configs' {
import {type Linter} from 'eslint';
const recommended: Linter.Config;
export = {recommended};
}
declare module 'eslint-plugin-sort-destructure-keys' {
import {plugin} from 'typescript-eslint';
const sortDestructureKeys: typeof plugin;
export = sortDestructureKeys;
}
interface Map<K, V> {
/**
* @description The `has` method checks if a specified key exists. When the key is present,
* the type of `this` is inferred as a `Map` instance that includes the `get` method,
* allowing safe access to the value associated with the key.
* @returns {boolean} Boolean indicating whether an element with the specified key exists or not.
*/
has<P extends K>(key: P): this is {get(key: P): V} & this;
}
interface WeakMap<K, V> {
/**
* @description The `has` method checks if a specified key exists. When the key is present,
* the type of `this` is inferred as a `WeakMap` instance that includes the `get` method,
* allowing safe access to the value associated with the key.
* @returns {boolean} Boolean indicating whether an element with the specified key exists or not.
*/
has<P extends K>(key: P): this is {get(key: P): V} & this;
}