diff --git a/packages/plugin/src/decorators.ts b/packages/plugin/src/decorators.ts index f8c4c812..19806147 100644 --- a/packages/plugin/src/decorators.ts +++ b/packages/plugin/src/decorators.ts @@ -1,7 +1,7 @@ import { interfaces } from './interfaces' import { METADATA_KEY } from './constants' import { injectable, decorate } from "inversify"; -import { getPluginMetadatas, getPluginCommandMetadata, getPluginListenerMetadata } from './utils' +import { getPluginMetadatas, getPluginCommandMetadata, getPluginListenerMetadata, getPluginTabCompleterMetadata } from './utils' /** * MiaoScript plugin @@ -43,7 +43,7 @@ export function tab(metadata: interfaces.TabCompleterMetadata = {}) { metadata.name = metadata.name || key; metadata.executor = key; metadata.paramtypes = Reflect.getMetadata("design:paramtypes", target, key) - const previousMetadata: Map = getPluginCommandMetadata(target) + const previousMetadata: Map = getPluginTabCompleterMetadata(target) previousMetadata.set(metadata.name, metadata) Reflect.defineMetadata(METADATA_KEY.tab, previousMetadata, target.constructor); };