Skip to content

Commit

Permalink
Rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhtr committed May 25, 2020
1 parent 4f768ff commit 9702d51
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 2 deletions.
2 changes: 1 addition & 1 deletion maas-schemas-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maas-schemas-ts",
"version": "13.5.1",
"version": "13.6.0",
"description": "TypeScript types and io-ts validators for maas-schemas",
"main": "index.js",
"files": [
Expand Down
76 changes: 76 additions & 0 deletions maas-schemas-ts/src/core/modes/MODE_SHARED_E_BICYCLE.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
undefined
undefined
!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!!
*/

import * as t from 'io-ts';

type Defined =
| Record<string, unknown>
| Array<unknown>
| string
| boolean
| number
| null;
const Defined = t.union([
t.UnknownRecord,
t.UnknownArray,
t.string,
t.boolean,
t.number,
t.null,
]);

export const schemaId = 'http://maasglobal.com/core/modes/MODE_SHARED_E_BICYCLE.json';

// MODE_SHARED_E_BICYCLE
// The default export. More information at the top.
export type MODE_SHARED_E_BICYCLE = t.Branded<
{
bike?: {
id?: string;
battery?: number;
} & {
id: Defined;
};
},
MODE_SHARED_E_BICYCLEBrand
>;
export const MODE_SHARED_E_BICYCLE = t.brand(
t.partial({
bike: t.intersection([
t.partial({
id: t.string,
battery: t.number,
}),
t.type({
id: Defined,
}),
]),
}),
(
x,
): x is t.Branded<
{
bike?: {
id?: string;
battery?: number;
} & {
id: Defined;
};
},
MODE_SHARED_E_BICYCLEBrand
> => true,
'MODE_SHARED_E_BICYCLE',
);
export interface MODE_SHARED_E_BICYCLEBrand {
readonly MODE_SHARED_E_BICYCLE: unique symbol;
}

export default MODE_SHARED_E_BICYCLE;

// Success
2 changes: 1 addition & 1 deletion maas-schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maas-schemas",
"version": "13.5.1",
"version": "13.6.0",
"description": "Schemas for MaaS infrastructure",
"main": "index.js",
"engine": {
Expand Down

0 comments on commit 9702d51

Please sign in to comment.