Skip to content

Commit 7921d6e

Browse files
committed
chore(createContext): change variable names
1 parent e45fe3c commit 7921d6e

File tree

1 file changed

+6
-6
lines changed
  • packages/0/src/factories/createContext

1 file changed

+6
-6
lines changed

packages/0/src/factories/createContext/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ export type ContextKey<Z> = InjectionKey<Z> | string
1414
*/
1515
export function useContext<Z> (key: ContextKey<Z>) {
1616
return function (): Z {
17-
const contextValue = inject<Z>(key)
17+
const context = inject<Z>(key)
1818

19-
if (contextValue === undefined) {
19+
if (context === undefined) {
2020
throw new Error(`Context "${String(key)}" not found. Ensure it's provided by an ancestor.`)
2121
}
2222

23-
return contextValue
23+
return context
2424
}
2525
}
2626

@@ -35,10 +35,10 @@ export function useContext<Z> (key: ContextKey<Z>) {
3535
* @see https://0.vuetifyjs.com/composables/foundation/create-context
3636
*/
3737
export function createContext<Z> (key: ContextKey<Z>) {
38-
function provideContext (value: Z, app?: App) {
39-
app ? app.provide(key, value) : provide(key, value)
38+
function provideContext (context: Z, app?: App) {
39+
app ? app.provide(key, context) : provide(key, context)
4040

41-
return value
41+
return context
4242
}
4343

4444
return [useContext<Z>(key), provideContext] as const

0 commit comments

Comments
 (0)