mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 04:33:31 +00:00
Add support for this
param in function type definitions
This commit is contained in:
parent
bcec700776
commit
fdbffffd3e
3 changed files with 15 additions and 1 deletions
|
@ -333,6 +333,12 @@ class Parser {
|
|||
}
|
||||
setParams(doclet, obj) {
|
||||
let parameters = [];
|
||||
if (doclet.this) {
|
||||
let typeName = this.prepareTypeName(doclet.this);
|
||||
let type = dom.create.namedTypeReference(this.processTypeName(typeName));
|
||||
let param = dom.create.parameter(dom.type.this, type);
|
||||
parameters.push(param);
|
||||
}
|
||||
if (doclet.params) {
|
||||
let optional = false;
|
||||
obj.jsDocComment = '';
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -449,6 +449,14 @@ export class Parser {
|
|||
private setParams(doclet: any, obj: dom.FunctionDeclaration | dom.ConstructorDeclaration): void {
|
||||
let parameters: dom.Parameter[] = [];
|
||||
|
||||
if (doclet.this) {
|
||||
let typeName = this.prepareTypeName(doclet.this);
|
||||
let type = dom.create.namedTypeReference(this.processTypeName(typeName));
|
||||
let param = dom.create.parameter(dom.type.this, type);
|
||||
|
||||
parameters.push(param);
|
||||
}
|
||||
|
||||
if (doclet.params) {
|
||||
|
||||
let optional = false;
|
||||
|
|
Loading…
Reference in a new issue