Browse Source

Merge pull request #2978 from nocodb/refactor/type-correction

fix(gui-v2): return type correction of provider
pull/2982/head
Pranav C 2 years ago committed by GitHub
parent
commit
e3575f5046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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>( export function useInjectionState<Arguments extends any[], Return>(
composable: (...args: Arguments) => Return, composable: (...args: Arguments) => Return,
keyName = 'InjectionState', 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 key: string | InjectionKey<Return> = Symbol(keyName)
const useProvidingState = (...args: Arguments) => { const useProvidingState = (...args: Arguments) => {

Loading…
Cancel
Save