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

fix typescript annotations #6

Merged
merged 1 commit into from
Apr 26, 2021
Merged

fix typescript annotations #6

merged 1 commit into from
Apr 26, 2021

Conversation

omarkhatibco
Copy link
Contributor

I was getting some errors from the typing, so I fixed it.

node_modules/@yimura/scraper/index.d.ts:10:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

10 const Constants = {
   ~~~~~

node_modules/@yimura/scraper/index.d.ts:10:19 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

10 const Constants = {
                     ~
11   SearchTypes,
   ~~~~~~~~~~~~~~
12   YoutubeURL: URL.prototype,
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 }
   ~

node_modules/@yimura/scraper/index.d.ts:11:3 - error TS2693: 'SearchTypes' only refers to a type, but is being used as a value here.

11   SearchTypes,
     ~~~~~~~~~~~

node_modules/@yimura/scraper/index.d.ts:92:10 - error TS1040: 'async' modifier cannot be used in an ambient context.

92   public async search(query: string, options?: SearchOptions): Promise<Results>;
            ~~~~~

@Yimura
Copy link
Owner

Yimura commented Apr 26, 2021

Thanks for your contribution, I don't use TypeScript so I rely on community contributions for typescript annotations.

I will merge it into master and try to publish it asap.

@Yimura Yimura merged commit c3e9393 into Yimura:master Apr 26, 2021
@Yimura
Copy link
Owner

Yimura commented Apr 26, 2021

Your changes have been pushed to npmjs.

@omarkhatibco
Copy link
Contributor Author

@Yimura thanks for your fast response !

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.

None yet

2 participants