@aurelia/kernel
Advanced tools
Comparing version 0.3.0-dev.20181123 to 0.3.0-dev.20181124
@@ -255,3 +255,3 @@ const camelCaseLookup = {}; | ||
const Key = function Key(target, property, descriptor) { | ||
return DI.inject(Key)(target, property, descriptor); | ||
DI.inject(Key)(target, property, descriptor); | ||
}; | ||
@@ -258,0 +258,0 @@ Key.resolve = function (handler, requestor) { |
@@ -261,3 +261,3 @@ (function (global, factory) { | ||
const Key = function Key(target, property, descriptor) { | ||
return DI.inject(Key)(target, property, descriptor); | ||
DI.inject(Key)(target, property, descriptor); | ||
}; | ||
@@ -264,0 +264,0 @@ Key.resolve = function (handler, requestor) { |
@@ -18,3 +18,3 @@ export interface ICallable { | ||
export declare type IIndexable<T extends object = object> = T & { | ||
[key: string]: any; | ||
[key: string]: unknown; | ||
}; | ||
@@ -21,0 +21,0 @@ export declare type ImmutableObject<T> = T extends [infer A1, infer B1, infer C1, infer D1, infer E1, infer F1, infer G] ? ImmutableArray<[A1, B1, C1, D1, E1, F1, G]> : T extends [infer A2, infer B2, infer C2, infer D2, infer E2, infer F2] ? ImmutableArray<[A2, B2, C2, D2, E2, F2]> : T extends [infer A3, infer B3, infer C3, infer D3, infer E3] ? ImmutableArray<[A3, B3, C3, D3, E3]> : T extends [infer A4, infer B4, infer C4, infer D4] ? ImmutableArray<[A4, B4, C4, D4]> : T extends [infer A5, infer B5, infer C5] ? ImmutableArray<[A5, B5, C5]> : T extends [infer A6, infer B6] ? ImmutableArray<[A6, B6]> : T extends [infer A7] ? ImmutableArray<[A7]> : T extends (infer A)[] ? ImmutableArray<A> : T extends unknown[] ? ImmutableArray<T[number]> : T extends Map<infer U1, infer V1> ? ReadonlyMap<Immutable<U1>, Immutable<V1>> : T extends Set<infer U2> ? ReadonlySet<Immutable<U2>> : T extends Record<string, infer V2> ? Record<string, Immutable<V2>> : T extends object ? Immutable<T> : T; |
{ | ||
"name": "@aurelia/kernel", | ||
"version": "0.3.0-dev.20181123", | ||
"version": "0.3.0-dev.20181124", | ||
"main": "dist/index.umd.js", | ||
@@ -80,3 +80,3 @@ "module": "dist/index.es6.js", | ||
}, | ||
"gitHead": "32b4ff08033976cb36a893b969afc349bfd9f927" | ||
"gitHead": "05d23715b6ca15e65f946b69637d16ed207e5020" | ||
} |
@@ -188,3 +188,3 @@ /// <reference types="reflect-metadata" /> | ||
if (!target.hasOwnProperty('inject')) { | ||
const types = DI.getDesignParamTypes(target) | ||
const types = DI.getDesignParamTypes(target); | ||
target.inject = types.slice(); | ||
@@ -204,3 +204,3 @@ } | ||
if (dependencies.length === 0) { | ||
const types = DI.getDesignParamTypes(target) | ||
const types = DI.getDesignParamTypes(target); | ||
target.inject = types.slice(); | ||
@@ -280,3 +280,3 @@ } else { | ||
const Key = function Key(target: Injectable, property?: string, descriptor?: PropertyDescriptor | number): void { | ||
return DI.inject(Key)(target, property, descriptor); | ||
DI.inject(Key)(target, property, descriptor); | ||
}; | ||
@@ -283,0 +283,0 @@ |
@@ -21,9 +21,3 @@ export interface ICallable { | ||
// Note: use of "any" here can perfectly well be replaced by "unknown" but that would also involve fixing consumers of this | ||
// interface since their indexed properties are now all returning "unknown" which is not assignable to anything else. | ||
// We are however not disabling this rule with "no-any" because it is a legitimate problem that tslint is warning us about, | ||
// and it should remind us of the fact that we have more work to do in making typings across the runtime more accurate. | ||
// For changing this "any" to "unknown", we could either resort to upcasting at the consumer side of things (less preferable because unsafe) | ||
// or we could simply return "unknown" at the API boundaries of consumers that return values from this object (more preferable but more work) | ||
export type IIndexable<T extends object = object> = T & { [key: string]: any }; | ||
export type IIndexable<T extends object = object> = T & { [key: string]: unknown }; | ||
@@ -30,0 +24,0 @@ export type ImmutableObject<T> = |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
214045
2408