Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(schema) add StringEnum to typebox module #2827

Merged
merged 2 commits into from
Nov 3, 2022
Merged

Conversation

marshallswain
Copy link
Member

Exports the StringEnum utility copied from the TypeBox docs.

// import the module, first
import { StringEnum, Static } from '@feathersjs/typebox'

const T = StringEnum(['crow', 'dove', 'eagle'])

type T = Static<typeof T>

I also added a TIP to the Enum utility to point people to StringEnum.

Screen Shot 2022-10-21 at 11 22 26 AM

@marshallswain marshallswain requested a review from daffl October 21, 2022 17:27
@netlify
Copy link

netlify bot commented Oct 21, 2022

Deploy Preview for feathers-dove ready!

Name Link
🔨 Latest commit 09aa642
🔍 Latest deploy log https://app.netlify.com/sites/feathers-dove/deploys/6364098a974109000838f220
😎 Deploy Preview https://deploy-preview-2827--feathers-dove.netlify.app/awesome
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@daffl daffl merged commit 65d3665 into dove Nov 3, 2022
@daffl daffl deleted the dove-typebox-enum branch November 3, 2022 18:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants