mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
workspace: update eslint config
This commit is contained in:
1 parent
4e4f6688bc
commit
3a3983d38d
29 files changed
+169
-166
No files matched your search
@@ -16,8 +16,8 @@ function isBailed(value: any) {
|
||||
return value !== null && value !== false && value !== undefined;
|
||||
}
|
||||
|
||||
export type Disposable = () => void
|
||||
export type VoidReturn = Promise<any> | any
|
||||
export type Disposable = () => void;
|
||||
export type VoidReturn = Promise<any> | any;
|
||||
|
||||
export interface EventMap {
|
||||
'app/started': () => void
|
||||
@@ -53,7 +53,7 @@ export interface EventMap {
|
||||
|
||||
'document/add': (doc: any) => VoidReturn
|
||||
'document/set': <T extends keyof DocType>
|
||||
(domainId: string, docType: T, docId: DocType[T], $set: any, $unset: OnlyFieldsOfType<DocType[T], any, true | '' | 1>) => VoidReturn
|
||||
(domainId: string, docType: T, docId: DocType[T], $set: any, $unset: OnlyFieldsOfType<DocType[T], any, true | '' | 1>) => VoidReturn
|
||||
|
||||
'problem/edit': (doc: Pdoc) => VoidReturn
|
||||
'problem/list': (query: FilterQuery<Pdoc>, handler: any) => VoidReturn
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable prefer-destructuring */
|
||||
import assert from 'assert';
|
||||
import { PassThrough } from 'stream';
|
||||
import { resolve } from 'path';
|
||||
@@ -199,7 +198,7 @@ type DescriptorBuilder =
|
||||
& ((name: string, type: Type, validate: null, convert: Converter) => MethodDecorator)
|
||||
& ((name: string, type: Type, validate?: Validator, convert?: Converter) => MethodDecorator)
|
||||
& ((name: string, type?: Type, isOptional?: boolean, validate?: Validator, convert?: Converter) => MethodDecorator)
|
||||
& ((name: string, ...args: Array<Type | boolean | Validator | Converter>) => MethodDecorator)
|
||||
& ((name: string, ...args: Array<Type | boolean | Validator | Converter>) => MethodDecorator);
|
||||
|
||||
export const get: DescriptorBuilder = (name, ...args) => _descriptor(_buildParam(name, 'get', ...args));
|
||||
export const post: DescriptorBuilder = (name, ...args) => _descriptor(_buildParam(name, 'post', ...args));
|
||||
@@ -663,7 +662,7 @@ export class ConnectionHandler extends HandlerCommon {
|
||||
params: Record<string, any>;
|
||||
headers: Record<string, string>;
|
||||
ip: string;
|
||||
}
|
||||
};
|
||||
|
||||
constructor(conn: sockjs.Connection) {
|
||||
super();
|
||||
|
||||
Reference in new issue
Block a user