jsgen: fix jsdoc class namespacing bug
parent
10ad5332e8
commit
d4c1ea4bba
|
@ -212,8 +212,8 @@ pub fn (mut g JsGen) typ(t table.Type) string {
|
||||||
return res + ') => ' + g.typ(info.func.return_type)
|
return res + ') => ' + g.typ(info.func.return_type)
|
||||||
}
|
}
|
||||||
// Struct instance => ns["class"]["prototype"]
|
// Struct instance => ns["class"]["prototype"]
|
||||||
if sym.kind == .struct_ {
|
if sym.kind == .struct_ && get_ns(styp).len > 0 {
|
||||||
return g.to_js_typ(styp) + '["prototype"]'
|
return g.to_js_typ(g.get_alias(styp)) + '["prototype"]'
|
||||||
}
|
}
|
||||||
return g.to_js_typ(styp)
|
return g.to_js_typ(styp)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// V_COMMIT_HASH 74686d0
|
// V_COMMIT_HASH 74686d0
|
||||||
// V_CURRENT_COMMIT_HASH 577d252
|
// V_CURRENT_COMMIT_HASH 0d3f133
|
||||||
// Generated by the V compiler
|
// Generated by the V compiler
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -74,7 +74,7 @@ const hello = (function () {
|
||||||
const main = (function (hl) {
|
const main = (function (hl) {
|
||||||
class Foo {
|
class Foo {
|
||||||
/**
|
/**
|
||||||
* @param {{a?: hello["A"]["prototype"]}} values - values for this class fields
|
* @param {{a?: hl["A"]["prototype"]}} values - values for this class fields
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
constructor(values) {
|
constructor(values) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// V_COMMIT_HASH 74686d0
|
// V_COMMIT_HASH 74686d0
|
||||||
// V_CURRENT_COMMIT_HASH 577d252
|
// V_CURRENT_COMMIT_HASH 0d3f133
|
||||||
// Generated by the V compiler
|
// Generated by the V compiler
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
Loading…
Reference in New Issue