@travetto/transformer 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/util/declaration.ts +2 -2
- package/src/util/literal.ts +1 -2
- package/src/util/log.ts +1 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/transformer",
|
|
3
3
|
"displayName": "Transformation",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "Functionality for AST transformations, with transformer registration, and general utils",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"typescript",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "module/transformer"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@travetto/base": "^2.2.
|
|
28
|
+
"@travetto/base": "^2.2.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
package/src/util/declaration.ts
CHANGED
|
@@ -57,8 +57,8 @@ export class DeclarationUtil {
|
|
|
57
57
|
* Resolve the `ts.ObjectFlags`
|
|
58
58
|
*/
|
|
59
59
|
static getObjectFlags(type: ts.Type): ts.ObjectFlags {
|
|
60
|
-
// @
|
|
61
|
-
return ts.getObjectFlags(type);
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
61
|
+
return (ts as unknown as { getObjectFlags(t: ts.Type): ts.ObjectFlags }).getObjectFlags(type);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
package/src/util/literal.ts
CHANGED
|
@@ -48,8 +48,7 @@ export class LiteralUtil {
|
|
|
48
48
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
49
49
|
const ov = val as object;
|
|
50
50
|
const pairs: ts.PropertyAssignment[] = [];
|
|
51
|
-
|
|
52
|
-
for (const k of Object.keys(ov) as (keyof typeof ov)[]) {
|
|
51
|
+
for (const k of Object.keys(ov)) {
|
|
53
52
|
if (ov[k] !== undefined) {
|
|
54
53
|
pairs.push(
|
|
55
54
|
factory.createPropertyAssignment(k, this.fromLiteral(factory, ov[k]))
|
package/src/util/log.ts
CHANGED
|
@@ -38,8 +38,7 @@ export class LogUtil {
|
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
39
39
|
const ox = x as object;
|
|
40
40
|
const out: Record<string, unknown> = {};
|
|
41
|
-
|
|
42
|
-
for (const key of Object.keys(ox) as (keyof typeof x)[]) {
|
|
41
|
+
for (const key of Object.keys(ox)) {
|
|
43
42
|
if (Util.isFunction(ox[key]) || exclude.has(key) || ox[key] === undefined) {
|
|
44
43
|
continue;
|
|
45
44
|
}
|