Skip to content
Myr

fix(context): fixed `ContextVariableMap` is not enabled in built code (#465)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent bc5e9b3 · Browse files · 2 files+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−0 removed

  • other:+8 added−0 removed

2 files+8 added−0 removed

modified:deno_dist/context.ts+4 added
modified:src/context.ts+4 added
103 unmodified lines
104 status(status: StatusCode): void {105 this._status = status106 }107108 set<Key extends keyof ContextVariableMap>(key: Key, value: ContextVariableMap[Key]): void109 set(key: string, value: any): void110 set(key: string, value: any): void {111 this._map ||= {}112 this._map[key] = value113 }114115 get<Key extends keyof ContextVariableMap>(key: Key): ContextVariableMap[Key]116 get<T = any>(key: string): T117 get(key: string) {118 if (!this._map) {119 return undefined120 }
63 unmodified lines