mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: remove deprecated apis
This commit is contained in:
26 files changed
+90
-249
No files matched your search
@@ -99,24 +99,6 @@ class ApiHandler extends Handler {
|
||||
}
|
||||
}
|
||||
|
||||
/** @deprecated use ctx.api.value() instead */
|
||||
export function registerValue(...args: any[]) {
|
||||
// @ts-ignore
|
||||
return app.api.value(...args);
|
||||
}
|
||||
|
||||
/** @deprecated use ctx.api.resolver() instead */
|
||||
export function registerResolver(...args: any[]) {
|
||||
// @ts-ignore
|
||||
return app.api.resolver(...args);
|
||||
}
|
||||
|
||||
/** @deprecated use ctx.api.union() instead */
|
||||
export function registerUnion(...args: any[]) {
|
||||
// @ts-ignore
|
||||
return app.api.resolver(...args);
|
||||
}
|
||||
|
||||
// TODO support dispose
|
||||
class ApiService extends Service {
|
||||
constructor(ctx: Context) {
|
||||
@@ -212,7 +194,7 @@ class ApiService extends Service {
|
||||
}
|
||||
|
||||
export const sideEffect = true;
|
||||
export const using = ['server'];
|
||||
export const inject = ['server'];
|
||||
|
||||
export function apply(ctx: Context) {
|
||||
ctx.plugin(ApiService);
|
||||
|
||||
Reference in new issue
Block a user