Skip to content

Commit 614d103

Browse files
committed
Fix types
1 parent 349cc01 commit 614d103

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/main.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type { ErrorClass }
2222
* export const DatabaseError = BaseError.subclass('DatabaseError')
2323
* ```
2424
*/
25-
declare const ModernError: SpecificErrorClass<[], {}, CustomClass>
25+
declare const ModernError: SpecificErrorClass<[], object, CustomClass>
2626
export default ModernError
2727

2828
// Major limitations of current types:

src/options/instance.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { PluginsOptions } from './plugins.js'
99
*/
1010
export type NormalizedCause<CauseArg extends Cause> = CauseArg extends Error
1111
? CauseArg
12-
: {}
12+
: object
1313

1414
/**
1515
* Optional `cause` option

src/plugins/instance/call.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type PluginInstanceMethods<PluginArg extends Plugin> = PluginArg extends {
5050
instanceMethods: InstanceMethods
5151
}
5252
? ErrorInstanceMethods<PluginArg['instanceMethods'], MethodOptions<PluginArg>>
53-
: {}
53+
: object
5454

5555
/**
5656
* Bound instance methods of all plugins

src/plugins/instance/mixed.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type PluginMixedMethods<PluginArg extends Plugin> = PluginArg extends {
5151
instanceMethods: InstanceMethods
5252
}
5353
? ErrorMixedMethods<PluginArg['instanceMethods'], MethodOptions<PluginArg>>
54-
: {}
54+
: object
5555

5656
/**
5757
* Bound mixed methods of all plugins

src/plugins/properties/main.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ type GetProperties = (info: InfoParameter['properties']) => AddedProperties
1515
type PluginProperties<PluginArg extends Plugin> = PluginArg extends Plugin
1616
? PluginArg extends { properties: GetProperties }
1717
? ReturnType<PluginArg['properties']>
18-
: {}
19-
: {}
18+
: object
19+
: object
2020

2121
/**
2222
* Bound added properties of all plugins

src/plugins/static/call.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type PluginStaticMethods<PluginArg extends Plugin> = PluginArg extends {
4747
staticMethods: StaticMethods
4848
}
4949
? ErrorStaticMethods<PluginArg['staticMethods'], MethodOptions<PluginArg>>
50-
: {}
50+
: object
5151

5252
/**
5353
* Bound static methods of all plugins

src/subclass/create.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type CreateSubclass<
3434
> = <
3535
ChildPlugins extends Plugins = [],
3636
ChildCustomClass extends CustomClassArg = CustomClassArg,
37-
ChildProps extends ErrorProps = {},
37+
ChildProps extends ErrorProps = object,
3838
>(
3939
errorName: ErrorName,
4040
options?: SpecificClassOptions<

src/utils/omit.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
export type OmitKeys<
66
Source,
77
OmittedKeys extends PropertyKey,
8-
> = keyof Source extends OmittedKeys ? {} : Omit<Source, OmittedKeys>
8+
> = keyof Source extends OmittedKeys ? object : Omit<Source, OmittedKeys>
99

1010
/**
1111
* Like `SetProps<LowObject, HighObject>` except it reduces empty `{}` for

0 commit comments

Comments
 (0)