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

docs(path): remove inexistant option #942

Merged
merged 2 commits into from
May 31, 2021
Merged

docs(path): remove inexistant option #942

merged 2 commits into from
May 31, 2021

Conversation

lowlighter
Copy link
Contributor

The default example on path/README.md is incorrect:

import { globToRegExp } from "https://deno.land/std@$STD_VERSION/path/glob.ts";

globToRegExp("foo/**/*.json", {
  flags: "g",
  extended: true,
  globstar: true,
  caseInsensitive: false,
}); // returns the regex to find all .json files in the folder foo.

It throws an error because flags is not defined on interface:

error: TS2345 [ERROR]: Argument of type '{ flags: string; extended: true; globstar: true; caseInsensitive: false; }' is not assignable to parameter of type 'GlobOptions'.
  Object literal may only specify known properties, and 'flags' does not exist in type 'GlobOptions'.
  flags: "g",
  ~~~~~~~~~~
    at ~/test.ts:4:3

It should be removed since it creates confusion

Copy link
Contributor

@wperron wperron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Let's just rebase when #938 lands to fix the type errors on canary

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lowlighter Thanks!

@kt3k kt3k merged commit e317c03 into denoland:main May 31, 2021
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.

3 participants