mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-08 18:39:20 +08:00
chore: turn on ts/method-signature-style (#55167)
This commit is contained in:
@@ -70,6 +70,6 @@ export interface MessageInstance {
|
||||
error: TypeOpen;
|
||||
warning: TypeOpen;
|
||||
loading: TypeOpen;
|
||||
open(args: ArgsProps): MessageType;
|
||||
destroy(key?: React.Key): void;
|
||||
open: (args: ArgsProps) => MessageType;
|
||||
destroy: (key?: React.Key) => void;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ interface ElementsHolderRef {
|
||||
|
||||
// Add `then` field for `ModalFunc` return instance.
|
||||
export type ModalFuncWithPromise = (...args: Parameters<ModalFunc>) => ReturnType<ModalFunc> & {
|
||||
then<T>(resolve: (confirmed: boolean) => T, reject: VoidFunction): Promise<T>;
|
||||
then: <T>(resolve: (confirmed: boolean) => T, reject: VoidFunction) => Promise<T>;
|
||||
};
|
||||
|
||||
export type HookAPI = Omit<Record<keyof ModalStaticFunctions, ModalFuncWithPromise>, 'warn'>;
|
||||
|
||||
@@ -49,7 +49,7 @@ export interface NotificationInstance {
|
||||
info: StaticFn;
|
||||
warning: StaticFn;
|
||||
open: StaticFn;
|
||||
destroy(key?: React.Key): void;
|
||||
destroy: (key?: React.Key) => void;
|
||||
}
|
||||
|
||||
export interface GlobalConfigProps {
|
||||
|
||||
@@ -33,7 +33,6 @@ export default antfu(
|
||||
'ts/explicit-function-return-type': 'off',
|
||||
'ts/ban-ts-comment': 'off', // TODO: remove this
|
||||
'ts/consistent-type-definitions': 'off',
|
||||
'ts/method-signature-style': 'off', // TODO: remove this
|
||||
'ts/no-non-null-asserted-optional-chain': 'off',
|
||||
'unicorn/prefer-node-protocol': 'off',
|
||||
'unicorn/prefer-includes': 'off', // TODO: remove this
|
||||
|
||||
2
typings/jest.d.ts
vendored
2
typings/jest.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
declare namespace jest {
|
||||
interface Matchers<R> {
|
||||
toHaveNoViolations(): R;
|
||||
toHaveNoViolations: () => R;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user