-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added isVendor()
, Vendor
type, organized testing, and web bundle
#2
Conversation
Instead of running `isVendor()` if you need to assign a variable to a supposed `string` that is a vendor, you can just set the type of the variable to `Vendor`. Thankfully, the TypeScript compiler will make sure that your variable is one of the valid `vendors`. | ||
|
||
```ts | ||
import { Vendor } from "https://deno.land/x/vendors/mod.ts"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be import type { Vendor } from "https://deno.land/x/vendors/mod.ts";
Here is an example of what would happen if our variable isn't a valid `Vendor`: | ||
|
||
```ts | ||
import { Vendor } from "https://deno.land/x/vendors/mod.ts"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be import type { Vendor } from "https://deno.land/x/vendors/mod.ts";
Please note the comments I added because I realize that you created a new branch with my fork. The README.md should have |
I have already updated the
README.md
&CHANGELOG.md
. I think that this should probably be in a0.2.0
release version after you look my changes over. Also, there is a breaking change as you usedexport default
in version0.1.0
. The testing also usesstd@0.69.0
instead ofstd@0.68.0
.