mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Update version of injectable for disambiguous typing
Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com> Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
0af1d08299
commit
2e5e549957
@ -188,8 +188,8 @@
|
||||
"@kubernetes/client-node": "^0.15.1",
|
||||
"@sentry/electron": "^2.5.4",
|
||||
"@sentry/integrations": "^6.15.0",
|
||||
"@ogre-tools/injectable": "^1.0.2",
|
||||
"@ogre-tools/injectable-react": "^1.0.3",
|
||||
"@ogre-tools/injectable": "^1.1.0",
|
||||
"@ogre-tools/injectable-react": "^1.1.0",
|
||||
"abort-controller": "^3.0.0",
|
||||
"auto-bind": "^4.0.0",
|
||||
"autobind-decorator": "^2.4.0",
|
||||
|
||||
9
types/ogre-tools-injectable-react.d.ts
vendored
9
types/ogre-tools-injectable-react.d.ts
vendored
@ -20,7 +20,7 @@
|
||||
*/
|
||||
/// <reference types="react" />
|
||||
declare module "@ogre-tools/injectable-react" {
|
||||
import type { IDependencyInjectionContainer } from "@ogre-tools/injectable";
|
||||
import type { IDependencyInjectionContainer, IInjectable } from "@ogre-tools/injectable";
|
||||
|
||||
interface IDependencyInjectionContainerProviderProps {
|
||||
di: IDependencyInjectionContainer;
|
||||
@ -29,16 +29,13 @@ declare module "@ogre-tools/injectable-react" {
|
||||
export const DiContextProvider: React.Provider<IDependencyInjectionContainerProviderProps>;
|
||||
|
||||
export const Inject: <
|
||||
TComponentInjectable extends IComponentInjectable<any, {}>,
|
||||
TComponentInjectable extends IInjectable<any>,
|
||||
>({
|
||||
Component,
|
||||
injectableKey,
|
||||
getPlaceholder,
|
||||
...props
|
||||
}: Omit<
|
||||
React.ComponentProps<TComponentInjectable["instantiate"]>,
|
||||
keyof ReturnType<TComponentInjectable["getDependencies"]>
|
||||
> & {
|
||||
}: Parameters<TComponentInjectable["instantiate"]>[1] & {
|
||||
injectableKey: TComponentInjectable;
|
||||
getPlaceholder?: () => JSX.Element | null;
|
||||
}) => JSX.Element;
|
||||
|
||||
17
types/ogre-tools-injectable.d.ts
vendored
17
types/ogre-tools-injectable.d.ts
vendored
@ -48,14 +48,15 @@ declare module "@ogre-tools/injectable" {
|
||||
lifecycle?: lifecycleEnum;
|
||||
}
|
||||
|
||||
export interface IInjectable<TInstance, TDependencies = {}>
|
||||
extends ICommonInjectable<TDependencies> {
|
||||
instantiate: (dependencies: TDependencies) => TInstance;
|
||||
}
|
||||
|
||||
export interface IComponentInjectable<TInstance, TDependencies = {}>
|
||||
extends ICommonInjectable<TDependencies> {
|
||||
instantiate: TInstance;
|
||||
export interface IInjectable<
|
||||
TInstance,
|
||||
TDependencies extends object = {},
|
||||
TInstantiationParameter extends object = {},
|
||||
> extends ICommonInjectable<TDependencies> {
|
||||
instantiate: (
|
||||
dependencies: TDependencies,
|
||||
instantiationParameter: TInstantiationParameter,
|
||||
) => TInstance;
|
||||
}
|
||||
|
||||
export enum lifecycleEnum {
|
||||
|
||||
18
yarn.lock
18
yarn.lock
@ -953,19 +953,19 @@
|
||||
dependencies:
|
||||
lodash "^4.17.21"
|
||||
|
||||
"@ogre-tools/injectable-react@^1.0.3":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@ogre-tools/injectable-react/-/injectable-react-1.0.3.tgz#e30ea455cc4ccf24fbad831b460023492832c2f9"
|
||||
integrity sha512-CFJeuezdJIZD0o0rp1MnahzItzZ7eSixSo0v0+002kq8T7HZb1ycD8d/zvXOBnkEF34K6GGibXicEw1q46SZzw==
|
||||
"@ogre-tools/injectable-react@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@ogre-tools/injectable-react/-/injectable-react-1.1.0.tgz#32757e250b5701c9b467331e99baf9702984106a"
|
||||
integrity sha512-qsC1Igi55SSiH0/oVuH1QcMFhUouEjhfZG5924PG+hqk2Hzsgi3gN1cnPMTpH8vXJiskNQ0tSrgklPb4w5J8KA==
|
||||
dependencies:
|
||||
"@ogre-tools/fp" "^1.0.2"
|
||||
"@ogre-tools/injectable" "^1.0.2"
|
||||
"@ogre-tools/injectable" "^1.1.0"
|
||||
lodash "^4.17.21"
|
||||
|
||||
"@ogre-tools/injectable@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@ogre-tools/injectable/-/injectable-1.0.2.tgz#b081fefb2026c57fe47e27c268efa73d43934546"
|
||||
integrity sha512-NZ7FHxKLfr+8o4aL51UQ212w1wD3QIsEN/JNtjtEq0TgLjd2Qo3zSniL4hCEj5M49K2qe3CxEb6ezyf2vFTb5g==
|
||||
"@ogre-tools/injectable@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@ogre-tools/injectable/-/injectable-1.1.0.tgz#095c9d12001d03dd96c98d8986392b0fee05262c"
|
||||
integrity sha512-ViuFC2iHM86os87W2qubUCAlPYzdxmZwtPBAExb2SLNMHk8Z8dRx9BGDk8AcfCd8aPUw5GHIgf7wxCAMWcyvlw==
|
||||
dependencies:
|
||||
"@ogre-tools/fp" "^1.0.2"
|
||||
lodash "^4.17.21"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user