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

Type collisions with common names #2537

Open
Cherry opened this issue Aug 15, 2024 · 1 comment · May be fixed by #2539
Open

Type collisions with common names #2537

Cherry opened this issue Aug 15, 2024 · 1 comment · May be fixed by #2539
Assignees
Labels
types Related to @cloudflare/workers-types

Comments

@Cherry
Copy link
Contributor

Cherry commented Aug 15, 2024

The latest versions of workers-types is now including image options:

export type InfoResponse
export type OutputOptions
export type Transform

https://github.com/Cloudflare-Mining/Cloudflare-Datamining/blob/38e659727fe7679e28731e5f2b7adf9ca8121dff/data/workers-types/2021-11-03/index.ts#L4748

etc. which are now available as globals when people load workers-types.

There have been some in the past like Params from Pages, but I wonder if this is something that will want to be thought about at some point with better handling of prefixes for non-standard things? There are a lot of things here that are prefixing with Ai or Pages. I'm not sure what the solution here is, but would love to open a discussion around it.

@Cherry Cherry added the types Related to @cloudflare/workers-types label Aug 15, 2024
@kentonv
Copy link
Member

kentonv commented Aug 15, 2024

Definitely agree that we shouldn't be dropping unqualified type names like this into the global scope when they are specific to a particular API.

@ns476 Can we clean this up please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Related to @cloudflare/workers-types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants