Skip to content
Permalink
Browse files
to-typescripts文件传入providersuffix
  • Loading branch information
xuegan committed Jun 28, 2018
1 parent b2c12fe commit 26f407ecf887bcaaf3afa505b9fd9fe8662d9c8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
@@ -60,6 +60,10 @@ export class IntepretHandle implements ITypeSearch {
return this.request.getAst(this.classPath);
}

get providerSuffix(): string {
return this.request.providerSuffix;
}

public async work() {
await this.prepare();
await this.doItRecursively();
@@ -78,6 +78,10 @@ export class Request {
return this.config.output;
}

get providerSuffix(): string{
return this.config.providerSuffix;
}

registerTypeInfo(typeInfoItem: TypeInfoI) {
let key = '';
if (typeInfoItem.classPath) {
@@ -46,7 +46,7 @@ export async function toTypescript(
isAbstract: astJava.isAbstract,
isInterface: astJava.isInterface,
isClass: !astJava.isEnum && !astJava.isInterface,
isProvider: astJava.name.endsWith('Provider'),
isProvider: astJava.name.endsWith(String(intepretHandle.providerSuffix) || 'Provider'),
};
intepretHandle.request.registerTypeInfo(typeInfo);

0 comments on commit 26f407e

Please sign in to comment.