@prismicio/types-internal 0.2.10 → 0.2.11
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.
|
@@ -6,6 +6,15 @@ export declare const Meta: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
|
6
6
|
end: t.NumberC;
|
|
7
7
|
type: t.StringC;
|
|
8
8
|
}>]>>;
|
|
9
|
+
export declare type Meta = t.TypeOf<typeof Meta>;
|
|
10
|
+
export declare const Span: t.ExactC<t.IntersectionC<[t.PartialC<{
|
|
11
|
+
data: t.UnknownC;
|
|
12
|
+
}>, t.TypeC<{
|
|
13
|
+
start: t.NumberC;
|
|
14
|
+
end: t.NumberC;
|
|
15
|
+
type: t.StringC;
|
|
16
|
+
}>]>>;
|
|
17
|
+
export declare type Span = Meta;
|
|
9
18
|
export declare const ValidatedMetas: t.Type<({
|
|
10
19
|
data?: unknown;
|
|
11
20
|
} & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Block = exports.TextBlock = exports.checkEmbedBlock = exports.EmbedBlock = exports.EmbedBlockType = exports.checkImageBlock = exports.ImageBlock = exports.ImageBlockType = exports.ValidatedMetas = exports.Meta = void 0;
|
|
3
|
+
exports.Block = exports.TextBlock = exports.checkEmbedBlock = exports.EmbedBlock = exports.EmbedBlockType = exports.checkImageBlock = exports.ImageBlock = exports.ImageBlockType = exports.ValidatedMetas = exports.Span = exports.Meta = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const E = (0, tslib_1.__importStar)(require("fp-ts/lib/Either"));
|
|
6
6
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
@@ -19,6 +19,8 @@ exports.Meta = t.exact(t.intersection([
|
|
|
19
19
|
type: t.string,
|
|
20
20
|
}),
|
|
21
21
|
]));
|
|
22
|
+
// export alias for code clarity
|
|
23
|
+
exports.Span = exports.Meta;
|
|
22
24
|
exports.ValidatedMetas = new t.Type("ValidatedMetas", (metas) => Array.isArray(metas) && metas.every(exports.Meta.is), (metas, c) => {
|
|
23
25
|
if (Array.isArray(metas)) {
|
|
24
26
|
const res = metas
|
package/package.json
CHANGED
|
@@ -19,8 +19,11 @@ export const Meta = t.exact(
|
|
|
19
19
|
}),
|
|
20
20
|
]),
|
|
21
21
|
)
|
|
22
|
+
export type Meta = t.TypeOf<typeof Meta>
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
// export alias for code clarity
|
|
25
|
+
export const Span = Meta
|
|
26
|
+
export type Span = Meta
|
|
24
27
|
|
|
25
28
|
export const ValidatedMetas = new t.Type<Meta[], Meta[], unknown>(
|
|
26
29
|
"ValidatedMetas",
|