@yuhere/js-jsonrpc2 2.1.15 → 2.1.16

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/README.md CHANGED
@@ -112,7 +112,7 @@ s.boolean() // boolean
112
112
  s.literal('2.0') // exact literal (string | number | boolean only)
113
113
  s.null() // exactly null
114
114
  s.array(s.string()) // string[]
115
- s.object({ id: s.number() }) // open object (default: all props optional, extra props kept)
115
+ s.object({ id: s.number() })
116
116
  s.object({ id: s.number() }).strict() // all declared props required, no extras
117
117
  s.record(s.number()) // Record<string, number>
118
118
  s.union([s.string(), s.number()])
@@ -290,12 +290,11 @@ export class ArraySchema extends NullableSchema {
290
290
  export class ObjectSchema extends NullableSchema {
291
291
  shape;
292
292
  kind = "object";
293
- optionalProps;
294
- allowUnknownProps = true;
293
+ optionalProps = [];
294
+ allowUnknownProps = false;
295
295
  constructor(shape) {
296
296
  super();
297
297
  this.shape = shape;
298
- this.optionalProps = Object.keys(shape);
299
298
  }
300
299
  optionalProperties(keys) {
301
300
  for (const key of keys) {
@@ -10673,7 +10673,7 @@ function Footer() {
10673
10673
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
10674
10674
  className: "footer-version",
10675
10675
  title: t("footer.version"),
10676
- children: ["v", "2.1.15"]
10676
+ children: ["v", "2.1.16"]
10677
10677
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
10678
10678
  className: "footer-links",
10679
10679
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
@@ -11091,4 +11091,4 @@ function App() {
11091
11091
  import_client.createRoot(document.getElementById("root")).render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(I18nProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {}) }) }) }));
11092
11092
  //#endregion
11093
11093
 
11094
- //# sourceMappingURL=index-WpdfQ_L9.js.map
11094
+ //# sourceMappingURL=index-C2Pf9oxO.js.map