chore: format code

This commit is contained in:
vben
2021-08-24 22:41:48 +08:00
parent 2884e863ce
commit 56a966cfbf
148 changed files with 259 additions and 250 deletions

View File

@@ -21,7 +21,7 @@ type ShallowUnwrap<T> = {
export function createContext<T>(
context: any,
key: InjectionKey<T> = Symbol(),
options: CreateContextOptions = {}
options: CreateContextOptions = {},
) {
const { readonly = true, createProvider = false, native = false } = options;
@@ -39,7 +39,7 @@ export function useContext<T>(key: InjectionKey<T>, defaultValue?: any, native?:
export function useContext<T>(
key: InjectionKey<T> = Symbol(),
defaultValue?: any
defaultValue?: any,
): ShallowUnwrap<T> {
return inject(key, defaultValue || {});
}