1 | import { IHtmlEngineHelper } from './html-engine-helper.interface';
|
2 |
|
3 | export class IndexableSignatureHelper implements IHtmlEngineHelper {
|
4 | public helperFunc(context: any, method) {
|
5 | const args = method.args.map(arg => `${arg.name}: ${arg.type}`).join(', ');
|
6 | if (method.name) {
|
7 | return `${method.name}[${args}]`;
|
8 | } else {
|
9 | return `[${args}]`;
|
10 | }
|
11 | }
|
12 | }
|