Skip to content
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

Merged
merged 13 commits into from
Sep 18, 2020

Conversation

sno2
Copy link
Contributor

@sno2 sno2 commented Sep 18, 2020

I have already updated the README.md & CHANGELOG.md. I think that this should probably be in a 0.2.0 release version after you look my changes over. Also, there is a breaking change as you used export default in version 0.1.0. The testing also uses std@0.69.0 instead of std@0.68.0.

@justjavac justjavac self-assigned this Sep 18, 2020
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";
Copy link
Contributor Author

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";
Copy link
Contributor Author

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";

@sno2
Copy link
Contributor Author

sno2 commented Sep 18, 2020

Please note the comments I added because I realize that you created a new branch with my fork. The README.md should have import type { Vendor } from "https://deno.land/x/vendors/mod.ts"; instead of import { Vendor } from "https://deno.land/x/vendors/mod.ts"; in two instances.

@justjavac justjavac merged commit ef0ab5f into justjavac:master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants