@nxtedition/types 23.0.46 → 23.0.48
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/nxtpression.d.ts +131 -7
- package/dist/records/index.d.ts +1 -9
- package/dist/records/utils.d.ts +20 -2
- package/dist/records/utils.tds.js +1 -1
- package/dist/records/validate/assert-guard.js +8 -8
- package/dist/records/validate/assert.js +8 -8
- package/dist/records/validate/is.js +4 -4
- package/dist/records/validate/schemas.js +7 -7
- package/dist/records/validate/stringify.js +5 -5
- package/dist/records/validate/validate-equals.js +8 -8
- package/dist/records/validate/validate.js +8 -8
- package/package.json +2 -3
package/dist/nxtpression.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.asynciterable" />
|
|
2
2
|
|
|
3
|
+
import type { IsUnion } from './internal';
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
All diff* functions should return a list of operations, often empty.
|
|
5
7
|
|
|
@@ -393,6 +395,18 @@ declare interface CopyOperation {
|
|
|
393
395
|
path: string;
|
|
394
396
|
}
|
|
395
397
|
|
|
398
|
+
declare type DbDomainKeys = Exclude<keyof DomainRecords, ProvidedDomainKeys>;
|
|
399
|
+
|
|
400
|
+
declare type DbExactKeys = Exclude<keyof ExactRecords, ProvidedExactKeys>;
|
|
401
|
+
|
|
402
|
+
declare type DbExactRecords = {
|
|
403
|
+
[Name in DbExactKeys]: GettablePossibleEmpty<ExactRecords[Name]>;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
declare type DbProvidedRecord = {
|
|
407
|
+
[Name in ProvidedExactKeys as `${Name}${string}`]: GettablePossibleEmpty<ExactRecords[Name]>;
|
|
408
|
+
};
|
|
409
|
+
|
|
396
410
|
declare interface DeepstreamDomainRecords {
|
|
397
411
|
":deepstream.replicate": DeepstreamDomainReplicateRecord;
|
|
398
412
|
}
|
|
@@ -432,8 +446,6 @@ declare interface DesignViewRow<Id = string, Key = string, Value = void> {
|
|
|
432
446
|
|
|
433
447
|
declare type DomainRecords = AssetDomainRecords & BundleDomainRecords & CloneDomainRecords & CommentReactionDomainRecords & CommentReadMarkDomainRecords & CommentDomainRecords & ConnectionDomainRecords & ContactDomainRecords & DeepstreamDomainRecords & DesignDomainRecords & EditDomainRecords & EventDomainRecords & FileDomainRecords & GeneralDomainRecords & MediaDomainRecords & MonitorDomainRecords & PanelDomainRecords & PermissionDomainRecords & PipelinePresetDomainRecords & PipelineDomainRecords & PlanningDomainRecords & PrompterDomainRecords & PublishDomainRecords & PublishedDomainRecords & RenderPresetDomainRecords & RenderDomainRecords & RevsDomainRecords & RoleDomainRecords & ScriptDomainRecords & SearchDomainRecords & SettingsDomainRecords & StoryboardDomainRecords & SubtitleStyleDomainRecords & SubtitleDomainRecords & TemplateDomainRecords & UserNotificationStatusDomainRecords & UserNotificationDomainRecords & UserDomainRecords;
|
|
434
448
|
|
|
435
|
-
declare type Domains = Exclude<keyof DomainRecords, ":design">;
|
|
436
|
-
|
|
437
449
|
declare type Dynamic = false | string[];
|
|
438
450
|
|
|
439
451
|
declare interface EditDomainRecords {
|
|
@@ -455,6 +467,36 @@ declare interface ElementNodeContent {
|
|
|
455
467
|
children: TextNodeContent[];
|
|
456
468
|
}
|
|
457
469
|
|
|
470
|
+
/**
|
|
471
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
472
|
+
|
|
473
|
+
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
474
|
+
|
|
475
|
+
@example
|
|
476
|
+
```
|
|
477
|
+
import type {EmptyObject} from 'type-fest';
|
|
478
|
+
|
|
479
|
+
// The following illustrates the problem with `{}`.
|
|
480
|
+
const foo1: {} = {}; // Pass
|
|
481
|
+
const foo2: {} = []; // Pass
|
|
482
|
+
const foo3: {} = 42; // Pass
|
|
483
|
+
const foo4: {} = {a: 1}; // Pass
|
|
484
|
+
|
|
485
|
+
// With `EmptyObject` only the first case is valid.
|
|
486
|
+
const bar1: EmptyObject = {}; // Pass
|
|
487
|
+
const bar2: EmptyObject = 42; // Fail
|
|
488
|
+
const bar3: EmptyObject = []; // Fail
|
|
489
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
493
|
+
|
|
494
|
+
@category Object
|
|
495
|
+
*/
|
|
496
|
+
declare type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
497
|
+
|
|
498
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
499
|
+
|
|
458
500
|
declare interface EmptyPublishRecord {
|
|
459
501
|
type: null;
|
|
460
502
|
asset?: string | null;
|
|
@@ -806,6 +848,10 @@ declare interface GeneralTitleRecord {
|
|
|
806
848
|
|
|
807
849
|
declare type Get<Data, Path extends string> = Path extends keyof Data ? Data[Path] : unknown;
|
|
808
850
|
|
|
851
|
+
declare type GettablePossibleEmpty<Data> = keyof Data extends never ? EmptyObject : Partial<Data> extends Data ? Data : SingleKeyObject<Data> extends never ? Data | EmptyObject : {
|
|
852
|
+
[K in keyof Data]+?: Data[K];
|
|
853
|
+
};
|
|
854
|
+
|
|
809
855
|
declare interface HeadingNodeContent extends ElementNodeContent {
|
|
810
856
|
type: "heading";
|
|
811
857
|
tag: "h1" | "h2" | "h3";
|
|
@@ -815,6 +861,48 @@ declare interface HorizontalRuleContent {
|
|
|
815
861
|
type: "horizontalrule";
|
|
816
862
|
}
|
|
817
863
|
|
|
864
|
+
/**
|
|
865
|
+
An if-else-like type that resolves depending on whether the given type is `{}`.
|
|
866
|
+
|
|
867
|
+
@see {@link IsEmptyObject}
|
|
868
|
+
|
|
869
|
+
@example
|
|
870
|
+
```
|
|
871
|
+
import type {IfEmptyObject} from 'type-fest';
|
|
872
|
+
|
|
873
|
+
type ShouldBeTrue = IfEmptyObject<{}>;
|
|
874
|
+
//=> true
|
|
875
|
+
|
|
876
|
+
type ShouldBeBar = IfEmptyObject<{key: any}, 'foo', 'bar'>;
|
|
877
|
+
//=> 'bar'
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
@category Type Guard
|
|
881
|
+
@category Utilities
|
|
882
|
+
*/
|
|
883
|
+
declare type IfEmptyObject<
|
|
884
|
+
T,
|
|
885
|
+
TypeIfEmptyObject = true,
|
|
886
|
+
TypeIfNotEmptyObject = false,
|
|
887
|
+
> = IsEmptyObject<T> extends true ? TypeIfEmptyObject : TypeIfNotEmptyObject;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
Returns a `boolean` for whether the type is strictly equal to an empty plain object, the `{}` value.
|
|
891
|
+
|
|
892
|
+
@example
|
|
893
|
+
```
|
|
894
|
+
import type {IsEmptyObject} from 'type-fest';
|
|
895
|
+
|
|
896
|
+
type Pass = IsEmptyObject<{}>; //=> true
|
|
897
|
+
type Fail = IsEmptyObject<[]>; //=> false
|
|
898
|
+
type Fail = IsEmptyObject<null>; //=> false
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
@see EmptyObject
|
|
902
|
+
@category Object
|
|
903
|
+
*/
|
|
904
|
+
declare type IsEmptyObject<T> = T extends EmptyObject ? true : false;
|
|
905
|
+
|
|
818
906
|
declare type IsoTimestamp = string;
|
|
819
907
|
|
|
820
908
|
declare type JsonPrimitive = string | number | boolean | null;
|
|
@@ -823,6 +911,14 @@ declare type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
|
823
911
|
[key: string]: JsonValue;
|
|
824
912
|
};
|
|
825
913
|
|
|
914
|
+
declare type KeyedDomainRecords = {
|
|
915
|
+
[Domain in DbDomainKeys as `${string}${Domain}`]: GettablePossibleEmpty<DomainRecords[Domain]>;
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
declare type KeyedProvidedDomainRecords = {
|
|
919
|
+
[Domain in ProvidedDomainKeys as `${string}${Domain}${string}`]: GettablePossibleEmpty<DomainRecords[Domain]>;
|
|
920
|
+
};
|
|
921
|
+
|
|
826
922
|
declare interface KeymapSetting {
|
|
827
923
|
title?: string;
|
|
828
924
|
sequence?: string;
|
|
@@ -1648,6 +1744,10 @@ declare interface PrompterDomainRecords {
|
|
|
1648
1744
|
":prompter": PrompterDomainRecord;
|
|
1649
1745
|
}
|
|
1650
1746
|
|
|
1747
|
+
declare type ProvidedDomainKeys = keyof DomainRecords & `${string}?`;
|
|
1748
|
+
|
|
1749
|
+
declare type ProvidedExactKeys = keyof ExactRecords & `${string}?`;
|
|
1750
|
+
|
|
1651
1751
|
declare interface ProvidedPermissionRecord {
|
|
1652
1752
|
permissions: PermissionRecordPermisson[];
|
|
1653
1753
|
}
|
|
@@ -1729,11 +1829,8 @@ number,
|
|
|
1729
1829
|
number
|
|
1730
1830
|
];
|
|
1731
1831
|
|
|
1732
|
-
declare
|
|
1733
|
-
|
|
1734
|
-
} & {
|
|
1735
|
-
[Property in keyof DesignDomainRecords as `${string}${Property}${string}`]: DesignDomainRecords[Property];
|
|
1736
|
-
} & ExactRecords;
|
|
1832
|
+
declare interface Records extends KeyedDomainRecords, KeyedProvidedDomainRecords, DbExactRecords, DbProvidedRecord {
|
|
1833
|
+
}
|
|
1737
1834
|
|
|
1738
1835
|
declare type RecordState = RecordStateNumber | RecordStateString;
|
|
1739
1836
|
|
|
@@ -2472,6 +2569,33 @@ declare interface SettingsPanelStoreTab extends ModuleTabsSettingsValue {
|
|
|
2472
2569
|
|
|
2473
2570
|
declare type SettingsRecord = Settings;
|
|
2474
2571
|
|
|
2572
|
+
/**
|
|
2573
|
+
Create a type that only accepts an object with a single key.
|
|
2574
|
+
|
|
2575
|
+
@example
|
|
2576
|
+
```
|
|
2577
|
+
import type {SingleKeyObject} from 'type-fest';
|
|
2578
|
+
|
|
2579
|
+
const someFunction = <T>(parameter: SingleKeyObject<T>) => {};
|
|
2580
|
+
|
|
2581
|
+
someFunction({
|
|
2582
|
+
value: true
|
|
2583
|
+
});
|
|
2584
|
+
|
|
2585
|
+
someFunction({
|
|
2586
|
+
value: true,
|
|
2587
|
+
otherKey: true
|
|
2588
|
+
});
|
|
2589
|
+
// Error: Argument of type '{value: boolean; otherKey: boolean}' is not assignable to parameter of type 'never'.ts(2345)
|
|
2590
|
+
```
|
|
2591
|
+
|
|
2592
|
+
@category Object
|
|
2593
|
+
*/
|
|
2594
|
+
declare type SingleKeyObject<ObjectType> =
|
|
2595
|
+
IsUnion<keyof ObjectType> extends true
|
|
2596
|
+
? never
|
|
2597
|
+
: IfEmptyObject<ObjectType, never, ObjectType>;
|
|
2598
|
+
|
|
2475
2599
|
declare type Spread<T1, T2> = Omit<T2, keyof T1> & T1;
|
|
2476
2600
|
|
|
2477
2601
|
declare interface StorageLocationsRecord {
|
package/dist/records/index.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import type { DomainRecords, DesignDomainRecords } from './domains/index.ts';
|
|
2
|
-
import type { ExactRecords } from './exact/index.ts';
|
|
3
1
|
export * from './domains/index.ts';
|
|
4
2
|
export * from './exact/index.ts';
|
|
5
|
-
export type
|
|
6
|
-
export type Records = {
|
|
7
|
-
[Property in Domains as `${string}${Property}`]: DomainRecords[Property];
|
|
8
|
-
} & {
|
|
9
|
-
[Property in keyof DesignDomainRecords as `${string}${Property}${string}`]: DesignDomainRecords[Property];
|
|
10
|
-
} & ExactRecords;
|
|
11
|
-
export { RecordNameToType } from './utils.ts';
|
|
3
|
+
export type { RecordNameToType, Records } from './utils.ts';
|
package/dist/records/utils.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import type { EmptyObject, SingleKeyObject } from 'type-fest';
|
|
2
|
-
import type { DomainRecords,
|
|
3
|
-
|
|
2
|
+
import type { DomainRecords, ExactRecords } from './index.ts';
|
|
3
|
+
type ProvidedDomainKeys = keyof DomainRecords & `${string}?`;
|
|
4
|
+
type DbDomainKeys = Exclude<keyof DomainRecords, ProvidedDomainKeys>;
|
|
5
|
+
type ProvidedExactKeys = keyof ExactRecords & `${string}?`;
|
|
6
|
+
type DbExactKeys = Exclude<keyof ExactRecords, ProvidedExactKeys>;
|
|
7
|
+
type KeyedDomainRecords = {
|
|
8
|
+
[Domain in DbDomainKeys as `${string}${Domain}`]: GettablePossibleEmpty<DomainRecords[Domain]>;
|
|
9
|
+
};
|
|
10
|
+
type KeyedProvidedDomainRecords = {
|
|
11
|
+
[Domain in ProvidedDomainKeys as `${string}${Domain}${string}`]: GettablePossibleEmpty<DomainRecords[Domain]>;
|
|
12
|
+
};
|
|
13
|
+
type DbExactRecords = {
|
|
14
|
+
[Name in DbExactKeys]: GettablePossibleEmpty<ExactRecords[Name]>;
|
|
15
|
+
};
|
|
16
|
+
type DbProvidedRecord = {
|
|
17
|
+
[Name in ProvidedExactKeys as `${Name}${string}`]: GettablePossibleEmpty<ExactRecords[Name]>;
|
|
18
|
+
};
|
|
19
|
+
export interface Records extends KeyedDomainRecords, KeyedProvidedDomainRecords, DbExactRecords, DbProvidedRecord {
|
|
20
|
+
}
|
|
21
|
+
export type RecordNameToType<T extends string> = T extends keyof Records ? Records[T] : unknown;
|
|
4
22
|
declare const providedRecordSymbol: unique symbol;
|
|
5
23
|
export type ProvidedRecord<T> = T & {
|
|
6
24
|
[providedRecordSymbol]: never;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expectType } from 'tsd';
|
|
2
2
|
const getType = (_) => null;
|
|
3
3
|
expectType(getType("asset.tags"));
|
|
4
|
-
expectType(getType(
|
|
4
|
+
// expectType<Partial<DomainRows>>(getType(':user'))
|
|
5
5
|
expectType(getType("id:user.receivedNotifications?"));
|
|
6
6
|
expectType(getType("id:user.receivedNotifications?limit=2"));
|
|
7
7
|
expectType(getType("{}:search?"));
|
|
@@ -1402,7 +1402,7 @@ function _assertGuardExactRecord(name, input) {
|
|
|
1402
1402
|
if (undefined === value)
|
|
1403
1403
|
return true;
|
|
1404
1404
|
return "string" === typeof value;
|
|
1405
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
1405
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); const _ao0 = (input, _path, _exceptionable = true) => (undefined === input.languages || ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1406
1406
|
method: "typia.assertGuard",
|
|
1407
1407
|
path: _path + ".languages",
|
|
1408
1408
|
expected: "(Record<string, string> | undefined)",
|
|
@@ -1452,7 +1452,7 @@ function _assertGuardExactRecord(name, input) {
|
|
|
1452
1452
|
path: _path + ".asset",
|
|
1453
1453
|
expected: "(string | undefined)",
|
|
1454
1454
|
value: input.asset
|
|
1455
|
-
}, _errorFactory)) && (undefined === input.weight || "
|
|
1455
|
+
}, _errorFactory)) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1456
1456
|
method: "typia.assertGuard",
|
|
1457
1457
|
path: _path + ".weight",
|
|
1458
1458
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
@@ -1485,7 +1485,7 @@ function _assertGuardExactRecord(name, input) {
|
|
|
1485
1485
|
if (undefined === value)
|
|
1486
1486
|
return true;
|
|
1487
1487
|
return "string" === typeof value;
|
|
1488
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
1488
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); const _ao0 = (input, _path, _exceptionable = true) => (undefined === input.languages || ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1489
1489
|
method: "typia.assertGuard",
|
|
1490
1490
|
path: _path + ".languages",
|
|
1491
1491
|
expected: "(Record<string, string> | undefined)",
|
|
@@ -1535,7 +1535,7 @@ function _assertGuardExactRecord(name, input) {
|
|
|
1535
1535
|
path: _path + ".asset",
|
|
1536
1536
|
expected: "(string | undefined)",
|
|
1537
1537
|
value: input.asset
|
|
1538
|
-
}, _errorFactory)) && (undefined === input.weight || "
|
|
1538
|
+
}, _errorFactory)) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1539
1539
|
method: "typia.assertGuard",
|
|
1540
1540
|
path: _path + ".weight",
|
|
1541
1541
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
@@ -12575,10 +12575,10 @@ function _assertGuardDomainRecord(domain, input) {
|
|
|
12575
12575
|
}; })()(input);
|
|
12576
12576
|
}
|
|
12577
12577
|
case ":script.content?": {
|
|
12578
|
-
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("
|
|
12578
|
+
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("link" === input.type || "text" === input.type || "autolink" === input.type) && "string" === typeof input.text && (undefined === input.style || "string" === typeof input.style) && (undefined === input.format || "number" === typeof input.format); const _io3 = input => "listitem" === input.type && "number" === typeof input.value && (undefined === input.checked || "boolean" === typeof input.checked) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io4 = input => "list" === input.type && ("number" === input.listType || "bullet" === input.listType || "check" === input.listType) && ("ul" === input.tag || "ol" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io5 = input => "paragraph" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io6 = input => "comment" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io7 = input => "heading" === input.type && ("h1" === input.tag || "h2" === input.tag || "h3" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io8 = input => "quote" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io9 = input => "horizontalrule" === input.type; const _iu0 = input => (() => {
|
|
12579
12579
|
if ("event" === input.type)
|
|
12580
12580
|
return _io1(input);
|
|
12581
|
-
else if ("
|
|
12581
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
12582
12582
|
return _io2(input);
|
|
12583
12583
|
else if ("listitem" === input.type)
|
|
12584
12584
|
return _io3(input);
|
|
@@ -12651,7 +12651,7 @@ function _assertGuardDomainRecord(domain, input) {
|
|
|
12651
12651
|
path: _path + ".children",
|
|
12652
12652
|
expected: "Array<EventNodeContent>",
|
|
12653
12653
|
value: input.children
|
|
12654
|
-
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => ("
|
|
12654
|
+
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => ("link" === input.type || "text" === input.type || "autolink" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
12655
12655
|
method: "typia.assertGuard",
|
|
12656
12656
|
path: _path + ".type",
|
|
12657
12657
|
expected: "(\"autolink\" | \"link\" | \"text\")",
|
|
@@ -12854,7 +12854,7 @@ function _assertGuardDomainRecord(domain, input) {
|
|
|
12854
12854
|
}, _errorFactory); const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
12855
12855
|
if ("event" === input.type)
|
|
12856
12856
|
return _ao1(input, _path, true && _exceptionable);
|
|
12857
|
-
else if ("
|
|
12857
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
12858
12858
|
return _ao2(input, _path, true && _exceptionable);
|
|
12859
12859
|
else if ("listitem" === input.type)
|
|
12860
12860
|
return _ao3(input, _path, true && _exceptionable);
|
|
@@ -1417,7 +1417,7 @@ function _assertExactRecord(name, input) {
|
|
|
1417
1417
|
if (undefined === value)
|
|
1418
1418
|
return true;
|
|
1419
1419
|
return "string" === typeof value;
|
|
1420
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
1420
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); const _ao0 = (input, _path, _exceptionable = true) => (undefined === input.languages || ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1421
1421
|
method: "typia.assert",
|
|
1422
1422
|
path: _path + ".languages",
|
|
1423
1423
|
expected: "(Record<string, string> | undefined)",
|
|
@@ -1467,7 +1467,7 @@ function _assertExactRecord(name, input) {
|
|
|
1467
1467
|
path: _path + ".asset",
|
|
1468
1468
|
expected: "(string | undefined)",
|
|
1469
1469
|
value: input.asset
|
|
1470
|
-
}, _errorFactory)) && (undefined === input.weight || "
|
|
1470
|
+
}, _errorFactory)) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1471
1471
|
method: "typia.assert",
|
|
1472
1472
|
path: _path + ".weight",
|
|
1473
1473
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
@@ -1501,7 +1501,7 @@ function _assertExactRecord(name, input) {
|
|
|
1501
1501
|
if (undefined === value)
|
|
1502
1502
|
return true;
|
|
1503
1503
|
return "string" === typeof value;
|
|
1504
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
1504
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); const _ao0 = (input, _path, _exceptionable = true) => (undefined === input.languages || ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1505
1505
|
method: "typia.assert",
|
|
1506
1506
|
path: _path + ".languages",
|
|
1507
1507
|
expected: "(Record<string, string> | undefined)",
|
|
@@ -1551,7 +1551,7 @@ function _assertExactRecord(name, input) {
|
|
|
1551
1551
|
path: _path + ".asset",
|
|
1552
1552
|
expected: "(string | undefined)",
|
|
1553
1553
|
value: input.asset
|
|
1554
|
-
}, _errorFactory)) && (undefined === input.weight || "
|
|
1554
|
+
}, _errorFactory)) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
1555
1555
|
method: "typia.assert",
|
|
1556
1556
|
path: _path + ".weight",
|
|
1557
1557
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
@@ -12687,10 +12687,10 @@ function _assertDomainRecord(domain, input) {
|
|
|
12687
12687
|
}; })()(input);
|
|
12688
12688
|
}
|
|
12689
12689
|
case ":script.content?": {
|
|
12690
|
-
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("
|
|
12690
|
+
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("link" === input.type || "text" === input.type || "autolink" === input.type) && "string" === typeof input.text && (undefined === input.style || "string" === typeof input.style) && (undefined === input.format || "number" === typeof input.format); const _io3 = input => "listitem" === input.type && "number" === typeof input.value && (undefined === input.checked || "boolean" === typeof input.checked) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io4 = input => "list" === input.type && ("number" === input.listType || "bullet" === input.listType || "check" === input.listType) && ("ul" === input.tag || "ol" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io5 = input => "paragraph" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io6 = input => "comment" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io7 = input => "heading" === input.type && ("h1" === input.tag || "h2" === input.tag || "h3" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io8 = input => "quote" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io9 = input => "horizontalrule" === input.type; const _iu0 = input => (() => {
|
|
12691
12691
|
if ("event" === input.type)
|
|
12692
12692
|
return _io1(input);
|
|
12693
|
-
else if ("
|
|
12693
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
12694
12694
|
return _io2(input);
|
|
12695
12695
|
else if ("listitem" === input.type)
|
|
12696
12696
|
return _io3(input);
|
|
@@ -12763,7 +12763,7 @@ function _assertDomainRecord(domain, input) {
|
|
|
12763
12763
|
path: _path + ".children",
|
|
12764
12764
|
expected: "Array<EventNodeContent>",
|
|
12765
12765
|
value: input.children
|
|
12766
|
-
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => ("
|
|
12766
|
+
}, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => ("link" === input.type || "text" === input.type || "autolink" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
12767
12767
|
method: "typia.assert",
|
|
12768
12768
|
path: _path + ".type",
|
|
12769
12769
|
expected: "(\"autolink\" | \"link\" | \"text\")",
|
|
@@ -12966,7 +12966,7 @@ function _assertDomainRecord(domain, input) {
|
|
|
12966
12966
|
}, _errorFactory); const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
12967
12967
|
if ("event" === input.type)
|
|
12968
12968
|
return _ao1(input, _path, true && _exceptionable);
|
|
12969
|
-
else if ("
|
|
12969
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
12970
12970
|
return _ao2(input, _path, true && _exceptionable);
|
|
12971
12971
|
else if ("listitem" === input.type)
|
|
12972
12972
|
return _ao3(input, _path, true && _exceptionable);
|
|
@@ -105,7 +105,7 @@ function _isExactRecord(name, input) {
|
|
|
105
105
|
if (undefined === value)
|
|
106
106
|
return true;
|
|
107
107
|
return "string" === typeof value;
|
|
108
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
108
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); return input => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); })()(input);
|
|
109
109
|
}
|
|
110
110
|
case "media.subtitles?": {
|
|
111
111
|
return (() => { const _io0 = input => (undefined === input.languages || "object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) && _io1(input.languages)) && (undefined === input.fontFaces || Array.isArray(input.fontFaces) && input.fontFaces.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io1 = input => Object.keys(input).every(key => {
|
|
@@ -113,7 +113,7 @@ function _isExactRecord(name, input) {
|
|
|
113
113
|
if (undefined === value)
|
|
114
114
|
return true;
|
|
115
115
|
return "string" === typeof value;
|
|
116
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
116
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); return input => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); })()(input);
|
|
117
117
|
}
|
|
118
118
|
case "media.transcribe?": {
|
|
119
119
|
return (() => { const _io0 = input => "object" === typeof input.engines && null !== input.engines && false === Array.isArray(input.engines) && _io1(input.engines) && ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) && _io1(input.languages)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && _io2(input.translate)); const _io1 = input => Object.keys(input).every(key => {
|
|
@@ -845,10 +845,10 @@ function _isDomainRecord(domain, input) {
|
|
|
845
845
|
}); const _io4 = input => "string" === typeof input.type && "number" === typeof input.version && (undefined === input.$ || "object" === typeof input.$ && null !== input.$ && false === Array.isArray(input.$) && _io3(input.$)); return input => "object" === typeof input && null !== input && _io0(input); })()(input);
|
|
846
846
|
}
|
|
847
847
|
case ":script.content?": {
|
|
848
|
-
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("
|
|
848
|
+
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("link" === input.type || "text" === input.type || "autolink" === input.type) && "string" === typeof input.text && (undefined === input.style || "string" === typeof input.style) && (undefined === input.format || "number" === typeof input.format); const _io3 = input => "listitem" === input.type && "number" === typeof input.value && (undefined === input.checked || "boolean" === typeof input.checked) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io4 = input => "list" === input.type && ("number" === input.listType || "bullet" === input.listType || "check" === input.listType) && ("ul" === input.tag || "ol" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io5 = input => "paragraph" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io6 = input => "comment" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io7 = input => "heading" === input.type && ("h1" === input.tag || "h2" === input.tag || "h3" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io8 = input => "quote" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io9 = input => "horizontalrule" === input.type; const _iu0 = input => (() => {
|
|
849
849
|
if ("event" === input.type)
|
|
850
850
|
return _io1(input);
|
|
851
|
-
else if ("
|
|
851
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
852
852
|
return _io2(input);
|
|
853
853
|
else if ("listitem" === input.type)
|
|
854
854
|
return _io3(input);
|
|
@@ -1219,10 +1219,10 @@ function _schemasExactRecord(name) {
|
|
|
1219
1219
|
weight: {
|
|
1220
1220
|
oneOf: [
|
|
1221
1221
|
{
|
|
1222
|
-
"const": "
|
|
1222
|
+
"const": "bold"
|
|
1223
1223
|
},
|
|
1224
1224
|
{
|
|
1225
|
-
"const": "
|
|
1225
|
+
"const": "normal"
|
|
1226
1226
|
}
|
|
1227
1227
|
]
|
|
1228
1228
|
},
|
|
@@ -1291,10 +1291,10 @@ function _schemasExactRecord(name) {
|
|
|
1291
1291
|
weight: {
|
|
1292
1292
|
oneOf: [
|
|
1293
1293
|
{
|
|
1294
|
-
"const": "
|
|
1294
|
+
"const": "bold"
|
|
1295
1295
|
},
|
|
1296
1296
|
{
|
|
1297
|
-
"const": "
|
|
1297
|
+
"const": "normal"
|
|
1298
1298
|
}
|
|
1299
1299
|
]
|
|
1300
1300
|
},
|
|
@@ -10429,13 +10429,13 @@ function _schemasDomainRecord(domain) {
|
|
|
10429
10429
|
type: {
|
|
10430
10430
|
oneOf: [
|
|
10431
10431
|
{
|
|
10432
|
-
"const": "
|
|
10432
|
+
"const": "link"
|
|
10433
10433
|
},
|
|
10434
10434
|
{
|
|
10435
|
-
"const": "
|
|
10435
|
+
"const": "text"
|
|
10436
10436
|
},
|
|
10437
10437
|
{
|
|
10438
|
-
"const": "
|
|
10438
|
+
"const": "autolink"
|
|
10439
10439
|
}
|
|
10440
10440
|
]
|
|
10441
10441
|
},
|
|
@@ -304,7 +304,7 @@ function _stringifyExactRecord(name, input) {
|
|
|
304
304
|
if (undefined === value)
|
|
305
305
|
return true;
|
|
306
306
|
return "string" === typeof value;
|
|
307
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
307
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); return input => _so0(input); })()(input);
|
|
308
308
|
}
|
|
309
309
|
case "media.subtitles?": {
|
|
310
310
|
return (() => { const _so0 = input => `{${__typia_transform__jsonStringifyTail._jsonStringifyTail(`${undefined === input.languages ? "" : `"languages":${undefined !== input.languages ? _so1(input.languages) : undefined},`}${undefined === input.fontFaces ? "" : `"fontFaces":${undefined !== input.fontFaces ? `[${input.fontFaces.map(elem => _so2(elem)).join(",")}]` : undefined}`}`)}}`; const _so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
@@ -313,7 +313,7 @@ function _stringifyExactRecord(name, input) {
|
|
|
313
313
|
if (undefined === value)
|
|
314
314
|
return true;
|
|
315
315
|
return "string" === typeof value;
|
|
316
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
316
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); return input => _so0(input); })()(input);
|
|
317
317
|
}
|
|
318
318
|
case "media.transcribe?": {
|
|
319
319
|
return (() => { const _so0 = input => `{${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? _so2(input.translate) : undefined},`}"engines":${_so1(input.engines)},"languages":${_so1(input.languages)}}`; const _so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
@@ -1663,7 +1663,7 @@ function _stringifyDomainRecord(domain, input) {
|
|
|
1663
1663
|
return (() => { const _so0 = input => `{"nodes":${`[${input.nodes.map(elem => _su0(elem)).join(",")}]`}}`; const _so1 = input => `{"type":${"\"" + input.type + "\""},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"mixin":${__typia_transform__jsonStringifyString._jsonStringifyString(input.mixin)},"children":${`[${input.children.map(elem => _so1(elem)).join(",")}]`}}`; const _so2 = input => `{${undefined === input.style ? "" : `"style":${undefined !== input.style ? __typia_transform__jsonStringifyString._jsonStringifyString(input.style) : undefined},`}${undefined === input.format ? "" : `"format":${undefined !== input.format ? input.format : undefined},`}"type":${"\"" + input.type + "\""},"text":${__typia_transform__jsonStringifyString._jsonStringifyString(input.text)}}`; const _so3 = input => `{${undefined === input.checked ? "" : `"checked":${undefined !== input.checked ? input.checked : undefined},`}"type":${"\"" + input.type + "\""},"value":${input.value},"children":${`[${input.children.map(elem => _so2(elem)).join(",")}]`}}`; const _so4 = input => `{"type":${"\"" + input.type + "\""},"listType":${"\"" + input.listType + "\""},"tag":${"\"" + input.tag + "\""},"children":${`[${input.children.map(elem => _so3(elem)).join(",")}]`}}`; const _so5 = input => `{"type":${"\"" + input.type + "\""},"children":${`[${input.children.map(elem => _so2(elem)).join(",")}]`}}`; const _so6 = input => `{"type":${"\"" + input.type + "\""},"children":${`[${input.children.map(elem => _so2(elem)).join(",")}]`}}`; const _so7 = input => `{"type":${"\"" + input.type + "\""},"tag":${"\"" + input.tag + "\""},"children":${`[${input.children.map(elem => _so2(elem)).join(",")}]`}}`; const _so8 = input => `{"type":${"\"" + input.type + "\""},"children":${`[${input.children.map(elem => _so2(elem)).join(",")}]`}}`; const _so9 = input => `{"type":${"\"" + input.type + "\""}}`; const _su0 = input => (() => {
|
|
1664
1664
|
if ("event" === input.type)
|
|
1665
1665
|
return _so1(input);
|
|
1666
|
-
else if ("
|
|
1666
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
1667
1667
|
return _so2(input);
|
|
1668
1668
|
else if ("listitem" === input.type)
|
|
1669
1669
|
return _so3(input);
|
|
@@ -1685,10 +1685,10 @@ function _stringifyDomainRecord(domain, input) {
|
|
|
1685
1685
|
expected: "(EventNodeContent | TextNodeContent | ListItemNodeContent | ListNodeContent | QuoteNodeContent | CommentNodeContent | ParagraphNodeContent | HeadingNodeContent | HorizontalRuleContent)",
|
|
1686
1686
|
value: input
|
|
1687
1687
|
});
|
|
1688
|
-
})(); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("
|
|
1688
|
+
})(); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("link" === input.type || "text" === input.type || "autolink" === input.type) && "string" === typeof input.text && (undefined === input.style || "string" === typeof input.style) && (undefined === input.format || "number" === typeof input.format); const _io3 = input => "listitem" === input.type && "number" === typeof input.value && (undefined === input.checked || "boolean" === typeof input.checked) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io4 = input => "list" === input.type && ("number" === input.listType || "bullet" === input.listType || "check" === input.listType) && ("ul" === input.tag || "ol" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io5 = input => "paragraph" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io6 = input => "comment" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io7 = input => "heading" === input.type && ("h1" === input.tag || "h2" === input.tag || "h3" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io8 = input => "quote" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io9 = input => "horizontalrule" === input.type; const _iu0 = input => (() => {
|
|
1689
1689
|
if ("event" === input.type)
|
|
1690
1690
|
return _io1(input);
|
|
1691
|
-
else if ("
|
|
1691
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
1692
1692
|
return _io2(input);
|
|
1693
1693
|
else if ("listitem" === input.type)
|
|
1694
1694
|
return _io3(input);
|
|
@@ -2328,7 +2328,7 @@ function _validateEqualsExactRecord(name, input) {
|
|
|
2328
2328
|
if (undefined === value)
|
|
2329
2329
|
return true;
|
|
2330
2330
|
return "string" === typeof value;
|
|
2331
|
-
}); const _io2 = (input, _exceptionable = true) => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
2331
|
+
}); const _io2 = (input, _exceptionable = true) => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
2332
2332
|
if (["family", "asset", "weight", "style"].some(prop => key === prop))
|
|
2333
2333
|
return true;
|
|
2334
2334
|
const value = input[key];
|
|
@@ -2392,7 +2392,7 @@ function _validateEqualsExactRecord(name, input) {
|
|
|
2392
2392
|
path: _path + ".asset",
|
|
2393
2393
|
expected: "(string | undefined)",
|
|
2394
2394
|
value: input.asset
|
|
2395
|
-
}), undefined === input.weight || "
|
|
2395
|
+
}), undefined === input.weight || "bold" === input.weight || "normal" === input.weight || _report(_exceptionable, {
|
|
2396
2396
|
path: _path + ".weight",
|
|
2397
2397
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
2398
2398
|
value: input.weight
|
|
@@ -2458,7 +2458,7 @@ function _validateEqualsExactRecord(name, input) {
|
|
|
2458
2458
|
if (undefined === value)
|
|
2459
2459
|
return true;
|
|
2460
2460
|
return "string" === typeof value;
|
|
2461
|
-
}); const _io2 = (input, _exceptionable = true) => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
2461
|
+
}); const _io2 = (input, _exceptionable = true) => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style) && (1 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
2462
2462
|
if (["family", "asset", "weight", "style"].some(prop => key === prop))
|
|
2463
2463
|
return true;
|
|
2464
2464
|
const value = input[key];
|
|
@@ -2522,7 +2522,7 @@ function _validateEqualsExactRecord(name, input) {
|
|
|
2522
2522
|
path: _path + ".asset",
|
|
2523
2523
|
expected: "(string | undefined)",
|
|
2524
2524
|
value: input.asset
|
|
2525
|
-
}), undefined === input.weight || "
|
|
2525
|
+
}), undefined === input.weight || "bold" === input.weight || "normal" === input.weight || _report(_exceptionable, {
|
|
2526
2526
|
path: _path + ".weight",
|
|
2527
2527
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
2528
2528
|
value: input.weight
|
|
@@ -18908,7 +18908,7 @@ function _validateEqualsDomainRecord(domain, input) {
|
|
|
18908
18908
|
if (undefined === value)
|
|
18909
18909
|
return true;
|
|
18910
18910
|
return false;
|
|
18911
|
-
})); const _io2 = (input, _exceptionable = true) => ("
|
|
18911
|
+
})); const _io2 = (input, _exceptionable = true) => ("link" === input.type || "text" === input.type || "autolink" === input.type) && "string" === typeof input.text && (undefined === input.style || "string" === typeof input.style) && (undefined === input.format || "number" === typeof input.format) && (2 === Object.keys(input).length || Object.keys(input).every(key => {
|
|
18912
18912
|
if (["type", "text", "style", "format"].some(prop => key === prop))
|
|
18913
18913
|
return true;
|
|
18914
18914
|
const value = input[key];
|
|
@@ -18967,7 +18967,7 @@ function _validateEqualsDomainRecord(domain, input) {
|
|
|
18967
18967
|
})); const _iu0 = (input, _exceptionable = true) => (() => {
|
|
18968
18968
|
if ("event" === input.type)
|
|
18969
18969
|
return _io1(input, true && _exceptionable);
|
|
18970
|
-
else if ("
|
|
18970
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
18971
18971
|
return _io2(input, true && _exceptionable);
|
|
18972
18972
|
else if ("listitem" === input.type)
|
|
18973
18973
|
return _io3(input, true && _exceptionable);
|
|
@@ -19061,7 +19061,7 @@ function _validateEqualsDomainRecord(domain, input) {
|
|
|
19061
19061
|
"Please remove the property next time."
|
|
19062
19062
|
].join("\n")
|
|
19063
19063
|
});
|
|
19064
|
-
}).every(flag => flag))].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["
|
|
19064
|
+
}).every(flag => flag))].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["link" === input.type || "text" === input.type || "autolink" === input.type || _report(_exceptionable, {
|
|
19065
19065
|
path: _path + ".type",
|
|
19066
19066
|
expected: "(\"autolink\" | \"link\" | \"text\")",
|
|
19067
19067
|
value: input.type
|
|
@@ -19352,7 +19352,7 @@ function _validateEqualsDomainRecord(domain, input) {
|
|
|
19352
19352
|
}).every(flag => flag))].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
19353
19353
|
if ("event" === input.type)
|
|
19354
19354
|
return _vo1(input, _path, true && _exceptionable);
|
|
19355
|
-
else if ("
|
|
19355
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
19356
19356
|
return _vo2(input, _path, true && _exceptionable);
|
|
19357
19357
|
else if ("listitem" === input.type)
|
|
19358
19358
|
return _vo3(input, _path, true && _exceptionable);
|
|
@@ -1378,7 +1378,7 @@ function _validateExactRecord(name, input) {
|
|
|
1378
1378
|
if (undefined === value)
|
|
1379
1379
|
return true;
|
|
1380
1380
|
return "string" === typeof value;
|
|
1381
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
1381
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.languages || ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) || _report(_exceptionable, {
|
|
1382
1382
|
path: _path + ".languages",
|
|
1383
1383
|
expected: "(Record<string, string> | undefined)",
|
|
1384
1384
|
value: input.languages
|
|
@@ -1419,7 +1419,7 @@ function _validateExactRecord(name, input) {
|
|
|
1419
1419
|
path: _path + ".asset",
|
|
1420
1420
|
expected: "(string | undefined)",
|
|
1421
1421
|
value: input.asset
|
|
1422
|
-
}), undefined === input.weight || "
|
|
1422
|
+
}), undefined === input.weight || "bold" === input.weight || "normal" === input.weight || _report(_exceptionable, {
|
|
1423
1423
|
path: _path + ".weight",
|
|
1424
1424
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
1425
1425
|
value: input.weight
|
|
@@ -1462,7 +1462,7 @@ function _validateExactRecord(name, input) {
|
|
|
1462
1462
|
if (undefined === value)
|
|
1463
1463
|
return true;
|
|
1464
1464
|
return "string" === typeof value;
|
|
1465
|
-
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "
|
|
1465
|
+
}); const _io2 = input => "string" === typeof input.family && (undefined === input.asset || "string" === typeof input.asset) && (undefined === input.weight || "bold" === input.weight || "normal" === input.weight) && (undefined === input.style || "normal" === input.style || "italic" === input.style); const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.languages || ("object" === typeof input.languages && null !== input.languages && false === Array.isArray(input.languages) || _report(_exceptionable, {
|
|
1466
1466
|
path: _path + ".languages",
|
|
1467
1467
|
expected: "(Record<string, string> | undefined)",
|
|
1468
1468
|
value: input.languages
|
|
@@ -1503,7 +1503,7 @@ function _validateExactRecord(name, input) {
|
|
|
1503
1503
|
path: _path + ".asset",
|
|
1504
1504
|
expected: "(string | undefined)",
|
|
1505
1505
|
value: input.asset
|
|
1506
|
-
}), undefined === input.weight || "
|
|
1506
|
+
}), undefined === input.weight || "bold" === input.weight || "normal" === input.weight || _report(_exceptionable, {
|
|
1507
1507
|
path: _path + ".weight",
|
|
1508
1508
|
expected: "(\"bold\" | \"normal\" | undefined)",
|
|
1509
1509
|
value: input.weight
|
|
@@ -12004,10 +12004,10 @@ function _validateDomainRecord(domain, input) {
|
|
|
12004
12004
|
}; })()(input);
|
|
12005
12005
|
}
|
|
12006
12006
|
case ":script.content?": {
|
|
12007
|
-
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("
|
|
12007
|
+
return (() => { const _io0 = input => Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)); const _io1 = input => "event" === input.type && "string" === typeof input.id && "string" === typeof input.mixin && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => ("link" === input.type || "text" === input.type || "autolink" === input.type) && "string" === typeof input.text && (undefined === input.style || "string" === typeof input.style) && (undefined === input.format || "number" === typeof input.format); const _io3 = input => "listitem" === input.type && "number" === typeof input.value && (undefined === input.checked || "boolean" === typeof input.checked) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io4 = input => "list" === input.type && ("number" === input.listType || "bullet" === input.listType || "check" === input.listType) && ("ul" === input.tag || "ol" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io3(elem))); const _io5 = input => "paragraph" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io6 = input => "comment" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io7 = input => "heading" === input.type && ("h1" === input.tag || "h2" === input.tag || "h3" === input.tag) && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io8 = input => "quote" === input.type && (Array.isArray(input.children) && input.children.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io9 = input => "horizontalrule" === input.type; const _iu0 = input => (() => {
|
|
12008
12008
|
if ("event" === input.type)
|
|
12009
12009
|
return _io1(input);
|
|
12010
|
-
else if ("
|
|
12010
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
12011
12011
|
return _io2(input);
|
|
12012
12012
|
else if ("listitem" === input.type)
|
|
12013
12013
|
return _io3(input);
|
|
@@ -12069,7 +12069,7 @@ function _validateDomainRecord(domain, input) {
|
|
|
12069
12069
|
path: _path + ".children",
|
|
12070
12070
|
expected: "Array<EventNodeContent>",
|
|
12071
12071
|
value: input.children
|
|
12072
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["
|
|
12072
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["link" === input.type || "text" === input.type || "autolink" === input.type || _report(_exceptionable, {
|
|
12073
12073
|
path: _path + ".type",
|
|
12074
12074
|
expected: "(\"autolink\" | \"link\" | \"text\")",
|
|
12075
12075
|
value: input.type
|
|
@@ -12232,7 +12232,7 @@ function _validateDomainRecord(domain, input) {
|
|
|
12232
12232
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
12233
12233
|
if ("event" === input.type)
|
|
12234
12234
|
return _vo1(input, _path, true && _exceptionable);
|
|
12235
|
-
else if ("
|
|
12235
|
+
else if ("link" === input.type || "text" === input.type || "autolink" === input.type)
|
|
12236
12236
|
return _vo2(input, _path, true && _exceptionable);
|
|
12237
12237
|
else if ("listitem" === input.type)
|
|
12238
12238
|
return _vo3(input, _path, true && _exceptionable);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/types",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.48",
|
|
4
4
|
"description": "TypeScript types to be shared between nxtedition packages.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"./records/validate/stringify": "./dist/records/validate/stringify.js",
|
|
21
21
|
"./records/validate/stringify.d.ts": "./dist/records/validate/stringify.d.ts",
|
|
22
22
|
"./records/validate/validate": "./dist/records/validate/validate.js",
|
|
23
|
-
"./records/validate/validate.d.ts": "./dist/records/validate/validate.d.ts"
|
|
24
|
-
"./schema.json": "./dist/schema.json"
|
|
23
|
+
"./records/validate/validate.d.ts": "./dist/records/validate/validate.d.ts"
|
|
25
24
|
},
|
|
26
25
|
"files": [
|
|
27
26
|
"dist"
|