@atscript/typescript 0.1.18 → 0.1.19
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/dist/cli.cjs +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/utils.cjs +4 -4
- package/dist/utils.d.ts +1 -1
- package/dist/utils.mjs +4 -4
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -690,14 +690,14 @@ else {
|
|
|
690
690
|
passed = false;
|
|
691
691
|
if (this.isLimitExceeded()) return false;
|
|
692
692
|
}
|
|
693
|
-
} else if (this.opts.
|
|
694
|
-
if (this.opts.
|
|
693
|
+
} else if (this.opts.unknownProps !== "ignore") {
|
|
694
|
+
if (this.opts.unknownProps === "error") {
|
|
695
695
|
this.push(key);
|
|
696
696
|
this.error(`Unexpected property`);
|
|
697
697
|
this.pop(true);
|
|
698
698
|
if (this.isLimitExceeded()) return false;
|
|
699
699
|
passed = false;
|
|
700
|
-
} else if (this.opts.
|
|
700
|
+
} else if (this.opts.unknownProps === "strip") delete value[key];
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
return passed;
|
|
@@ -849,7 +849,7 @@ else {
|
|
|
849
849
|
this.stackPath = [];
|
|
850
850
|
this.opts = {
|
|
851
851
|
partial: false,
|
|
852
|
-
|
|
852
|
+
unknownProps: "error",
|
|
853
853
|
errorLimit: 10,
|
|
854
854
|
...opts,
|
|
855
855
|
plugins: opts?.plugins || []
|
package/dist/index.cjs
CHANGED
|
@@ -687,14 +687,14 @@ else {
|
|
|
687
687
|
passed = false;
|
|
688
688
|
if (this.isLimitExceeded()) return false;
|
|
689
689
|
}
|
|
690
|
-
} else if (this.opts.
|
|
691
|
-
if (this.opts.
|
|
690
|
+
} else if (this.opts.unknownProps !== "ignore") {
|
|
691
|
+
if (this.opts.unknownProps === "error") {
|
|
692
692
|
this.push(key);
|
|
693
693
|
this.error(`Unexpected property`);
|
|
694
694
|
this.pop(true);
|
|
695
695
|
if (this.isLimitExceeded()) return false;
|
|
696
696
|
passed = false;
|
|
697
|
-
} else if (this.opts.
|
|
697
|
+
} else if (this.opts.unknownProps === "strip") delete value[key];
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
return passed;
|
|
@@ -846,7 +846,7 @@ else {
|
|
|
846
846
|
this.stackPath = [];
|
|
847
847
|
this.opts = {
|
|
848
848
|
partial: false,
|
|
849
|
-
|
|
849
|
+
unknownProps: "error",
|
|
850
850
|
errorLimit: 10,
|
|
851
851
|
...opts,
|
|
852
852
|
plugins: opts?.plugins || []
|
package/dist/index.mjs
CHANGED
|
@@ -663,14 +663,14 @@ else {
|
|
|
663
663
|
passed = false;
|
|
664
664
|
if (this.isLimitExceeded()) return false;
|
|
665
665
|
}
|
|
666
|
-
} else if (this.opts.
|
|
667
|
-
if (this.opts.
|
|
666
|
+
} else if (this.opts.unknownProps !== "ignore") {
|
|
667
|
+
if (this.opts.unknownProps === "error") {
|
|
668
668
|
this.push(key);
|
|
669
669
|
this.error(`Unexpected property`);
|
|
670
670
|
this.pop(true);
|
|
671
671
|
if (this.isLimitExceeded()) return false;
|
|
672
672
|
passed = false;
|
|
673
|
-
} else if (this.opts.
|
|
673
|
+
} else if (this.opts.unknownProps === "strip") delete value[key];
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
return passed;
|
|
@@ -822,7 +822,7 @@ else {
|
|
|
822
822
|
this.stackPath = [];
|
|
823
823
|
this.opts = {
|
|
824
824
|
partial: false,
|
|
825
|
-
|
|
825
|
+
unknownProps: "error",
|
|
826
826
|
errorLimit: 10,
|
|
827
827
|
...opts,
|
|
828
828
|
plugins: opts?.plugins || []
|
package/dist/utils.cjs
CHANGED
|
@@ -242,14 +242,14 @@ else {
|
|
|
242
242
|
passed = false;
|
|
243
243
|
if (this.isLimitExceeded()) return false;
|
|
244
244
|
}
|
|
245
|
-
} else if (this.opts.
|
|
246
|
-
if (this.opts.
|
|
245
|
+
} else if (this.opts.unknownProps !== "ignore") {
|
|
246
|
+
if (this.opts.unknownProps === "error") {
|
|
247
247
|
this.push(key);
|
|
248
248
|
this.error(`Unexpected property`);
|
|
249
249
|
this.pop(true);
|
|
250
250
|
if (this.isLimitExceeded()) return false;
|
|
251
251
|
passed = false;
|
|
252
|
-
} else if (this.opts.
|
|
252
|
+
} else if (this.opts.unknownProps === "strip") delete value[key];
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
return passed;
|
|
@@ -401,7 +401,7 @@ else {
|
|
|
401
401
|
this.stackPath = [];
|
|
402
402
|
this.opts = {
|
|
403
403
|
partial: false,
|
|
404
|
-
|
|
404
|
+
unknownProps: "error",
|
|
405
405
|
errorLimit: 10,
|
|
406
406
|
...opts,
|
|
407
407
|
plugins: opts?.plugins || []
|
package/dist/utils.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface TValidatorOptions {
|
|
|
15
15
|
partial: boolean | 'deep' | ((type: TAtscriptAnnotatedType<TAtscriptTypeObject>, path: string) => boolean);
|
|
16
16
|
replace?: (type: TAtscriptAnnotatedType, path: string) => TAtscriptAnnotatedType;
|
|
17
17
|
plugins: TValidatorPlugin[];
|
|
18
|
-
|
|
18
|
+
unknownProps: 'strip' | 'ignore' | 'error';
|
|
19
19
|
errorLimit: number;
|
|
20
20
|
skipList?: Set<string>;
|
|
21
21
|
}
|
package/dist/utils.mjs
CHANGED
|
@@ -241,14 +241,14 @@ else {
|
|
|
241
241
|
passed = false;
|
|
242
242
|
if (this.isLimitExceeded()) return false;
|
|
243
243
|
}
|
|
244
|
-
} else if (this.opts.
|
|
245
|
-
if (this.opts.
|
|
244
|
+
} else if (this.opts.unknownProps !== "ignore") {
|
|
245
|
+
if (this.opts.unknownProps === "error") {
|
|
246
246
|
this.push(key);
|
|
247
247
|
this.error(`Unexpected property`);
|
|
248
248
|
this.pop(true);
|
|
249
249
|
if (this.isLimitExceeded()) return false;
|
|
250
250
|
passed = false;
|
|
251
|
-
} else if (this.opts.
|
|
251
|
+
} else if (this.opts.unknownProps === "strip") delete value[key];
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
return passed;
|
|
@@ -400,7 +400,7 @@ else {
|
|
|
400
400
|
this.stackPath = [];
|
|
401
401
|
this.opts = {
|
|
402
402
|
partial: false,
|
|
403
|
-
|
|
403
|
+
unknownProps: "error",
|
|
404
404
|
errorLimit: 10,
|
|
405
405
|
...opts,
|
|
406
406
|
plugins: opts?.plugins || []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/typescript",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Atscript: typescript-gen support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"annotations",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"vitest": "3.2.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@atscript/core": "^0.1.
|
|
64
|
+
"@atscript/core": "^0.1.19"
|
|
65
65
|
},
|
|
66
66
|
"build": [
|
|
67
67
|
{},
|