Comparing version 1.20.1 to 1.20.2
## 6 August 2019 | ||
### [1.20.2](https://github.com/artdecocode/typal/compare/v1.20.1...v1.20.2) | ||
- [fix] Don't print static methods and properties in typedef. | ||
### [1.20.1](https://github.com/artdecocode/typal/compare/v1.20.0...v1.20.1) | ||
@@ -4,0 +8,0 @@ |
@@ -787,5 +787,5 @@ #!/usr/bin/env node | ||
l ? a.g = l : a.g = a.type; | ||
void 0 !== k && (a.f = !0); | ||
a.f && (a.default = k); | ||
if (f || a.f) { | ||
void 0 !== k && (a.i = !0); | ||
a.i && (a.default = k); | ||
if (f || a.i) { | ||
a.optional = !0; | ||
@@ -796,3 +796,3 @@ } | ||
p && (a.v = p); | ||
q && (a.l = !0); | ||
q && (a.f = !0); | ||
if (!a.v) { | ||
@@ -827,3 +827,3 @@ try { | ||
b = a.optional ? `[${b}]` : b; | ||
const d = `${a.description ? ` ${a.description}` : ""}${a.f ? ` Default \`${a.default}\`.` : ""}`; | ||
const d = `${a.description ? ` ${a.description}` : ""}${a.i ? ` Default \`${a.default}\`.` : ""}`; | ||
return `{${lb(a, c)}} ${b}${d}`; | ||
@@ -879,3 +879,3 @@ } | ||
this.g = ""; | ||
this.f = !1; | ||
this.i = !1; | ||
this.default = null; | ||
@@ -887,6 +887,6 @@ this.optional = !1; | ||
this.args = a; | ||
this.l = !1; | ||
this.f = !1; | ||
} | ||
get H() { | ||
return this.l; | ||
return this.f; | ||
} | ||
@@ -955,8 +955,8 @@ get m() { | ||
kb(u, Kb, D); | ||
Jb && (u.l = !0); | ||
Jb && (u.f = !0); | ||
return u; | ||
}); | ||
a.j = [...c, ...b]; | ||
a.l = [...c, ...b]; | ||
} | ||
d && (a.i = d); | ||
d && (a.j = d); | ||
Aa && (a.m = Aa); | ||
@@ -968,4 +968,4 @@ } | ||
b = O(b.join("\n")); | ||
b += R(a.i, a.name, a.X); | ||
const c = a.j.reduce((d, e) => { | ||
b += R(a.j, a.name, a.X); | ||
const c = a.l.reduce((d, e) => { | ||
d.push(e); | ||
@@ -998,3 +998,6 @@ const f = e.B.map(g => sb(e, g)); | ||
d = ` * @typedef {${(b ? a.g : a.type) || xb(a)}}${` ${wb(a, d)}${a.f}`}`; | ||
a = (a.j ? a.j.reduce((e, f) => { | ||
a = (a.l ? a.l.reduce((e, f) => { | ||
if (f.f) { | ||
return e; | ||
} | ||
e.push(f); | ||
@@ -1014,3 +1017,3 @@ const g = f.B.map(h => sb(f, h)); | ||
const e = !!a.extends, f = yb(a, b, c, d), g = []; | ||
if (a.i && b) { | ||
if (a.j && b) { | ||
var h = ` * @typedef {${a.h}} ${a.name}${a.f}`; | ||
@@ -1021,3 +1024,3 @@ b && !c && (h = Q(h)); | ||
} else { | ||
a.i && d && (h = ` * @typedef {${a.h}} ${a.name}${a.f}`, h = O(h), g.push(h)); | ||
a.j && d && (h = ` * @typedef {${a.h}} ${a.name}${a.f}`, h = O(h), g.push(h)); | ||
} | ||
@@ -1046,4 +1049,4 @@ e && (a = ` * @typedef {${a.extends} & ${wb(a, d)}} ${d ? a.h : a.name}${a.f}`, b && !c && (a = Q(a)), a = O(a), g.push(a)); | ||
this.link = this.N = this.import = this.O = this.P = this.description = this.g = this.type = null; | ||
this.j = []; | ||
this.i = null; | ||
this.l = []; | ||
this.j = null; | ||
this.v = this.G = this.isConstructor = !1; | ||
@@ -1070,6 +1073,6 @@ this.extends = null; | ||
get f() { | ||
return `${this.l ? ` \`\uff20${this.l}\`` : ""}${this.description ? ` ${this.description}` : ""}`; | ||
return `${this.i ? ` \`\uff20${this.i}\`` : ""}${this.description ? ` ${this.description}` : ""}`; | ||
} | ||
get Y() { | ||
const a = this.l; | ||
const a = this.i; | ||
if (!a) { | ||
@@ -1080,3 +1083,3 @@ throw Error("Unknown prototype type (not constructor or interface)."); | ||
} | ||
get l() { | ||
get i() { | ||
return this.isConstructor ? "constructor" : this.G ? "interface" : this.v ? "record" : ""; | ||
@@ -1091,3 +1094,3 @@ } | ||
get A() { | ||
return this.i ? `${this.i}.` : ""; | ||
return this.j ? `${this.j}.` : ""; | ||
} | ||
@@ -1102,5 +1105,5 @@ get h() { | ||
d = this.description ? ` ${this.description}` : ""; | ||
const g = this.O ? Ab(this.j) : e ? this.h : this.name; | ||
const g = this.O ? Ab(this.l) : e ? this.h : this.name; | ||
b = `${c || ""} * @param {${f}${g}} ${b ? `[${a}]` : a}${d}`; | ||
f = this.j && !this.N ? this.j.map(h => h.L(a, c, e)) : []; | ||
f = this.l && !this.N ? this.l.map(h => h.L(a, c, e)) : []; | ||
return [b, ...f].join("\n"); | ||
@@ -1159,3 +1162,3 @@ } | ||
}); | ||
this.l = b; | ||
this.i = b; | ||
this.b = []; | ||
@@ -1235,3 +1238,3 @@ this.o = console.log; | ||
}); | ||
return {i:d, types:a, imports:f, $:g}; | ||
return {j:d, types:a, imports:f, $:g}; | ||
}, Y = (a, b, c, d) => { | ||
@@ -1260,3 +1263,3 @@ const e = new X, f = a.search(/<(prop|function|fn|static) /); | ||
a = await F(a); | ||
let {i:c = null, types:d, imports:e} = Nb(a); | ||
let {j:c = null, types:d, imports:e} = Nb(a); | ||
d = d.filter(f => { | ||
@@ -1270,3 +1273,3 @@ ({h:f} = f); | ||
}); | ||
return {types:d, imports:e, i:c}; | ||
return {types:d, imports:e, j:c}; | ||
}; | ||
@@ -1284,4 +1287,4 @@ const Pb = (a, b, c) => { | ||
let f; | ||
e.g ? f = ` * @typedef {${e.g}}` : e.Z || (f = ` * @typedef {${Ab(e.j, !0)}}`); | ||
f ? (e.description && (f = ` * ${e.description}\n${f}`), f = O(f), e = f += R(e.i, e.name)) : e = ub(e); | ||
e.g ? f = ` * @typedef {${e.g}}` : e.Z || (f = ` * @typedef {${Ab(e.l, !0)}}`); | ||
f ? (e.description && (f = ` * ${e.description}\n${f}`), f = O(f), e = f += R(e.j, e.name)) : e = ub(e); | ||
} | ||
@@ -1298,3 +1301,3 @@ return e; | ||
m = m ? m.replace("ignore:", "").split(",") : []; | ||
let {F:n, K:p} = this.l; | ||
let {F:n, K:p} = this.i; | ||
f && (n = !0); | ||
@@ -1304,3 +1307,3 @@ g && (p = !0); | ||
this.o("Detected type marker: %s", c); | ||
const {types:q, imports:r, i:t} = await Ob(d, m); | ||
const {types:q, imports:r, j:t} = await Ob(d, m); | ||
this.emit("types", q); | ||
@@ -1322,3 +1325,3 @@ this.emit("types", r); | ||
function Ub(a, b, c, d, e, f, g) { | ||
const {F:h} = this.l; | ||
const {F:h} = this.i; | ||
let k; | ||
@@ -1429,3 +1432,3 @@ f = () => { | ||
_transform(a, b, c) { | ||
var {type:d, name:e, description:f, j:g} = a; | ||
var {type:d, name:e, description:f, l:g} = a; | ||
a = d && d.startsWith("import") ? ec(d, e) : cc(d, e, f, g); | ||
@@ -1476,3 +1479,3 @@ this.push(a); | ||
}); | ||
this.push({type:d, name:e, description:f, j:a}); | ||
this.push({type:d, name:e, description:f, l:a}); | ||
c(); | ||
@@ -1531,3 +1534,3 @@ } | ||
} | ||
e = e.j.find(({name:h}) => h == g); | ||
e = e.l.find(({name:h}) => h == g); | ||
return e ? e.b ? rb(e, d) : (console.error("Property %s of type %s in %s wasn't parsed, possibly parser bug.", g, f, b), c) : (console.error("Property %s of type %s in %s not found", g, f, b), c); | ||
@@ -1534,0 +1537,0 @@ }}]); |
{ | ||
"name": "typal", | ||
"version": "1.20.1", | ||
"version": "1.20.2", | ||
"description": "Organises TypeDefs By Placing Them Into Types.Xml File To Be Embedded Into Source Code Compatible With VSCode And Google Closure Compiler, Generates Externs And Allows To Place Documentation In README Markdown.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -260,2 +260,3 @@ import extractTags from 'rexml' | ||
const properties = this.properties ? this.properties.reduce((acc, p) => { | ||
if (p._static) return acc | ||
acc.push(p) | ||
@@ -262,0 +263,0 @@ const a = p.aliases.map(al => p.makeAlias(al)) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
330002
6182