object literal type to the interface type

more readable & predictable
This commit is contained in:
tazgong 2019-05-03 03:20:33 +09:00 committed by GitHub
parent 816a315176
commit a2417451fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ function storeServiceDependency(id: Function, target: Function, index: number, o
/**
* A *only* valid way to create a {{ServiceIdentifier}}.
*/
export function createDecorator<T>(serviceId: string): { (...args: any[]): void; type: T; } {
export function createDecorator<T>(serviceId: string): ServiceIdentifier<T> {
if (_util.serviceIds.has(serviceId)) {
return _util.serviceIds.get(serviceId)!;