neo-one | The One for easy, fast, & fun NEO app development | Graph Database library
kandi X-RAY | neo-one Summary
kandi X-RAY | neo-one Summary
The One for easy, fast, & fun NEO app development.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of neo-one
neo-one Key Features
neo-one Examples and Code Snippets
Community Discussions
Trending Discussions on neo-one
QUESTION
Is there a possibility to use enums in neo-one smart contracts? I tried to declare an enum, but got the following error:
This is how I declared it:
...ANSWER
Answered 2020-Nov-28 at 07:43The NEO•ONE TypeScript Smart Contract compiler actually does not currently support enums, which is why you are getting that error. When the compiler runs into an enum declaration (via the enum
keyword) it just reports an unsupported syntax error. So I recommend just using a plain JS "object" to accomplish the same thing. Like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install neo-one
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page