-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented a simple type lookup mapping file to extend the possible types
- Loading branch information
1 parent
98a6efc
commit 4a7566a
Showing
2 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Type Mappings | ||
* @note I've kept this as a TypeScript file and not JSON cause I wasn't sure if we could | ||
* // do some kind of fancy auto compiling from a TypeScript interface definition to | ||
* // JSON object type map? | ||
*/ | ||
|
||
interface TypeMapping { | ||
[key:string]:string | ||
} | ||
|
||
const types:TypeMapping = { | ||
'string':'string', | ||
'bool':'boolean', | ||
'name':'string|number', | ||
'int8':'number', | ||
'int16':'number', | ||
'int32':'number', | ||
'int64':'number', | ||
'int128':'number', | ||
'int256':'number', | ||
'uint8':'number', | ||
'uint16':'number', | ||
'uint32':'number', | ||
'uint64':'number', | ||
'uint128':'number', | ||
'uint256':'number', | ||
'uint8_t':'number', | ||
'uint16_t':'number', | ||
'uint32_t':'number', | ||
'uint64_t':'number', | ||
'uint128_t':'number', | ||
'uint256_t':'number' | ||
} | ||
|
||
export default types; |