mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-16 12:51:39 +00:00
fix(shell): fix api
This commit is contained in:
parent
fed0b39b27
commit
6b3ea9e209
@ -36,15 +36,16 @@ const buildNotimpl = (name: string) => {
|
||||
[notimplSym]: boolean
|
||||
}
|
||||
)[notimplSym] = true
|
||||
|
||||
return fn
|
||||
}
|
||||
|
||||
const handler: ProxyHandler<Api> = {
|
||||
get: function (target, name) {
|
||||
return typeof name === 'symbol' ||
|
||||
get: (target, name) =>
|
||||
typeof name === 'symbol' ||
|
||||
Object.prototype.hasOwnProperty.call(target, name)
|
||||
? target[name as keyof Methods]
|
||||
: buildNotimpl(name)
|
||||
},
|
||||
: buildNotimpl(name),
|
||||
}
|
||||
|
||||
export const api = new Proxy({} as Api, handler)
|
||||
|
Loading…
Reference in New Issue
Block a user