Browse Source

fix(gui-v2): return type correction of provider

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2978/head
Pranav C 2 years ago
parent
commit
335458176a
  1. 2
      packages/nc-gui-v2/composables/useInjectionState/index.ts

2
packages/nc-gui-v2/composables/useInjectionState/index.ts

@ -3,7 +3,7 @@ import type { InjectionKey } from 'vue'
export function useInjectionState<Arguments extends any[], Return>(
composable: (...args: Arguments) => Return,
keyName = 'InjectionState',
): readonly [useProvidingState: (...args: Arguments) => void, useInjectedState: () => Return | undefined] {
): readonly [useInjectionState: (...args: Arguments) => Return, useInjectedState: () => Return | undefined] {
const key: string | InjectionKey<Return> = Symbol(keyName)
const useProvidingState = (...args: Arguments) => {

Loading…
Cancel
Save