Skip to content

WIP - Remove some package types from global - #1936

Closed
nickytonline wants to merge 3 commits into
refined-github:masterfrom
nickytonline:remove-some-package-types-from-global
Closed

nickytonline wants to merge 3 commits into
refined-github:masterfrom
nickytonline:remove-some-package-types-from-global

Conversation

@nickytonline

Copy link
Copy Markdown
Contributor

Relates to cleanup for #1735. See #1783 (comment)

const options = {
user: currentRepo.ownerName || '/',
repo: currentRepo.repoName || '/',
repository: currentRepo.repoName || '/',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just need to sort out the signature for the fn parameter as the options are different.

ERROR in /Users/nickytonline/dev/refined-github/source/features/linkify-urls-in-code.tsx
[tsl] ERROR in /Users/nickytonline/dev/refined-github/source/features/linkify-urls-in-code.tsx(35,21)
      TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ (string: string, options: TypeDomOptions): DocumentFragment; (string: string, options?: Options | undefined): string; } | { (string: string, options: TypeDomOptions): DocumentFragment; (string: string, options?: Options | undefined): string; }' has no compatible call signatures.

Comment thread package.json
"linkify-issues": "^1.3.0",
"linkify-urls": "^2.2.0",
"linkify-issues": "^2.0.0",
"linkify-urls": "^3.1.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should at least update the comment about using the bundled type defs when it's implemented in Firefox and link to the Firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1225665

@fregante fregante Apr 18, 2019 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps v3's types can be backported to v2 and you can publish v2.2.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just checking if we'll add the types to v.2.2.1. If so, I can do this tonight. If not we can leave them in RGH globals.d.ts with the TODO pointing to this comment as @bfred-it mentions, #1962 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just checking if we'll add the types to v.2.2.1.

No, just leave them for now.

@sindresorhus

Copy link
Copy Markdown
Member

linkify-issues uses lookbehinds now too.

@sindresorhus

Copy link
Copy Markdown
Member

unless you can port v3's types to v2 and let @sindresorhus publish that as 2.2.1

Nah. Too much trouble for it to be worth it. We can just wait it out.

@fregante

Copy link
Copy Markdown
Member

We can just wait it out.

I want to remind you that some bugs on bugzilla are older than some RGH contributors

@sindresorhus

sindresorhus commented Apr 18, 2019 •

Copy link
Copy Markdown
Member

I want to remind you that some bugs on bugzilla are older than some RGH contributors

¯\_(ツ)_/¯ They have pressure now that people are starting to use it, since it works in Chrome and Safari. It will be implemented within the end of this year at the latest. I'm 100% sure.

@fregante fregante added the meta Related to Refined GitHub itself label Apr 18, 2019
@fregante

fregante commented Apr 21, 2019 •

Copy link
Copy Markdown
Member

There are some type todo’s that would be good to complete as well. Perhaps you can close this PR though, since the changes done so far need to be undone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

3 participants