Variable ThingConst

Thing: IntersectionC<[TypeC<{}>, PartialC<{
    content: ArrayC<IntersectionC<[TypeC<{
        type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
    }>, PartialC<{
        id: StringC;
        service: UrlFromStringC;
        url: UrlFromStringC;
    }>]>>;
    doi: StringC;
    id: StringC;
    published: DateFromUnknownC;
    type: UnionC<[LiteralC<string>, ArrayC<LiteralC<string>>]> | UnionC<[ArrayC<UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>>, UnionC<[LiteralC<string>, LiteralC<string>, ...LiteralC<string>[]]>]>;
    url: UrlFromStringC;
}>]> = ...

An output or input.

Example

import { ThingT, Thing } from '@docmaps/sdk';
import { Validation } from 'io-ts';

const C: Validation<ThingT> = Thing.decode({
published: '2020-01-01',
id: '123456',
doi: '10.12345/abcdef',
type: 'Article',
content: [{
type: 'text',
text: 'This is an example of a thing'
}]
});

Since

0.1.0

TODO - now that we have Types, we could do more assertive shaping based on a given Type value implying certain fields must exist *

Generated using TypeDoc