@fedify/vocab-tools 2.4.0-pr.936.41 → 2.4.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/README.md +39 -0
- package/deno.json +1 -1
- package/dist/mod.cjs +570 -123
- package/dist/mod.d.cts +14 -0
- package/dist/mod.d.ts +14 -0
- package/dist/mod.js +570 -123
- package/dist/schema.yaml +15 -0
- package/package.json +2 -2
- package/src/__snapshots__/class.test.ts.deno.snap +54490 -12168
- package/src/__snapshots__/class.test.ts.node.snap +54490 -12168
- package/src/__snapshots__/class.test.ts.snap +54490 -12168
- package/src/class.ts +116 -0
- package/src/codec.ts +133 -34
- package/src/constructor.ts +16 -4
- package/src/inspector.ts +4 -4
- package/src/property.ts +343 -70
- package/src/schema.ts +16 -0
- package/src/schema.yaml +15 -0
- package/src/type.ts +20 -8
package/dist/mod.d.cts
CHANGED
|
@@ -36,6 +36,13 @@ interface TypeSchema {
|
|
|
36
36
|
*/
|
|
37
37
|
entity: boolean;
|
|
38
38
|
/**
|
|
39
|
+
* Whether this type's id can establish same-origin trust for its own
|
|
40
|
+
* embedded entity-valued properties. Defaults to true. Set to false for
|
|
41
|
+
* metadata whose id does not identify an independently fetched resource.
|
|
42
|
+
* Locally constructed and explicitly trusted values remain trusted.
|
|
43
|
+
*/
|
|
44
|
+
trustEmbeddedObjects?: boolean;
|
|
45
|
+
/**
|
|
39
46
|
* Whether the type omits `@type` in JSON-LD serialization. When `true`,
|
|
40
47
|
* the generated `toJsonLd()` method will not emit `@type` (or `type` in
|
|
41
48
|
* compact form) in the serialized JSON-LD. The generated `fromJsonLd()`
|
|
@@ -61,6 +68,13 @@ interface TypeSchema {
|
|
|
61
68
|
defaultContext: Context;
|
|
62
69
|
}
|
|
63
70
|
interface PropertySchemaBase {
|
|
71
|
+
/**
|
|
72
|
+
* A context URL added to the default serialization context when this
|
|
73
|
+
* property's expanded IRI appears in the compacted document. Explicit
|
|
74
|
+
* caller contexts are unchanged. Populated properties with this option
|
|
75
|
+
* use the JSON-LD processor instead of compact serialization heuristics.
|
|
76
|
+
*/
|
|
77
|
+
extraContext?: string;
|
|
64
78
|
/**
|
|
65
79
|
* The singular form of the property name. It is used as the name of the
|
|
66
80
|
* generated property accessors.
|
package/dist/mod.d.ts
CHANGED
|
@@ -36,6 +36,13 @@ interface TypeSchema {
|
|
|
36
36
|
*/
|
|
37
37
|
entity: boolean;
|
|
38
38
|
/**
|
|
39
|
+
* Whether this type's id can establish same-origin trust for its own
|
|
40
|
+
* embedded entity-valued properties. Defaults to true. Set to false for
|
|
41
|
+
* metadata whose id does not identify an independently fetched resource.
|
|
42
|
+
* Locally constructed and explicitly trusted values remain trusted.
|
|
43
|
+
*/
|
|
44
|
+
trustEmbeddedObjects?: boolean;
|
|
45
|
+
/**
|
|
39
46
|
* Whether the type omits `@type` in JSON-LD serialization. When `true`,
|
|
40
47
|
* the generated `toJsonLd()` method will not emit `@type` (or `type` in
|
|
41
48
|
* compact form) in the serialized JSON-LD. The generated `fromJsonLd()`
|
|
@@ -61,6 +68,13 @@ interface TypeSchema {
|
|
|
61
68
|
defaultContext: Context;
|
|
62
69
|
}
|
|
63
70
|
interface PropertySchemaBase {
|
|
71
|
+
/**
|
|
72
|
+
* A context URL added to the default serialization context when this
|
|
73
|
+
* property's expanded IRI appears in the compacted document. Explicit
|
|
74
|
+
* caller contexts are unchanged. Populated properties with this option
|
|
75
|
+
* use the JSON-LD processor instead of compact serialization heuristics.
|
|
76
|
+
*/
|
|
77
|
+
extraContext?: string;
|
|
64
78
|
/**
|
|
65
79
|
* The singular form of the property name. It is used as the name of the
|
|
66
80
|
* generated property accessors.
|