Commit 793c463f authored by nanahira's avatar nanahira

add constructor in config schema

parent a49b4d07
......@@ -4,7 +4,11 @@ import { RegisterSchema, DefineSchema } from 'schemastery-gen';
@RegisterSchema()
export class MemcachedCachePluginConfig {
@DefineSchema({ description: 'Memcached 服务器地址', default: 'localhost:11211' })
constructor(config: Partial<MemcachedCachePluginConfig>) {}
@DefineSchema({
description: 'Memcached 服务器地址',
default: 'localhost:11211',
})
endpoint: string;
@DefineSchema({
......@@ -17,4 +21,5 @@ export class MemcachedCachePluginConfig {
prefix: string;
}
export type MemcachedCachePluginConfigLike = Partial<MemcachedCachePluginConfig>;
export type MemcachedCachePluginConfigLike =
Partial<MemcachedCachePluginConfig>;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment