Last active
July 18, 2017 20:35
-
-
Save resistdesign/6be9251161a8a015313c2d899530f925 to your computer and use it in GitHub Desktop.
Universal Type Structure (UTS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Type Map | |
| { | |
| PrimitiveType: { | |
| name: 'PrimitiveType', | |
| label: 'Primitive Type', | |
| primitive: true | |
| }, | |
| AnotherType: { | |
| name: 'AnotherType', | |
| label: 'Another Type', | |
| remote: true | |
| }, | |
| TypeName: { | |
| name: 'TypeName', | |
| label: 'Type Label', | |
| features: { // type level configuration for specific systems using the type map | |
| feature1: { | |
| configParam1: true, | |
| configParam2: 'anything' | |
| }, | |
| feature2: {} | |
| }, | |
| fields: { | |
| fieldName1: { | |
| type: 'AnotherType', | |
| label: 'Field Label', | |
| // multiple: true, // for nested arrays | |
| // embedded: true, // for embedded objects or arrays | |
| features: { // field level configuration for specific systems using the type map | |
| feature1: { | |
| configParam1: true, | |
| configParam2: 'anything' | |
| }, | |
| feature2: {} | |
| } | |
| }, | |
| fieldName2: {} | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // An alternate means of relating items. | |
| export default class Relationship { | |
| parentType; | |
| parentId; | |
| parentField; | |
| index; | |
| targetType; | |
| targetId; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment