mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #31036 from j2L4e/feathers-default-export
@feathersjs/feathers: make default export type generic
This commit is contained in:
@@ -9,7 +9,7 @@ interface Services {
|
||||
users: User;
|
||||
}
|
||||
|
||||
const app = feathers() as Application<Services>;
|
||||
const app = feathers<Services>();
|
||||
|
||||
app.service('users').get(0).then(u => {
|
||||
const user: User = u;
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import * as self from '@feathersjs/feathers';
|
||||
|
||||
declare const feathers: (() => Application<object>) & typeof self;
|
||||
// tslint:disable-next-line no-unnecessary-generics
|
||||
declare const feathers: (<T = any>() => Application<T>) & typeof self;
|
||||
export default feathers;
|
||||
|
||||
export const version: string;
|
||||
|
||||
Reference in New Issue
Block a user