-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Master feature] TypeScript in AMP #13791
Comments
I wish I had done this July 22nd 2015 :) |
Everyone, please fill out the public preliminary interest survey! 🙏 |
Overall: Positive sentiment: Negative sentiment: See full survey results. |
This issue seems to be in Pending Triage for awhile. @danielrozenberg Please triage this to an appropriate milestone. |
Just checking in; is there any update on this? Currently this is causing friction in adopting Next.js with Typescript. |
This experiment hasn't been prioritized yet. Deferring to @ampproject/wg-infra for scheduling. |
I'd be interested in taking a stab at Closure/Typescript interactions, what the migration process could look like, etc. Infra team has discussed using |
someone have news for this feature ? |
There's insufficient staffing for this for the foreseeable future. Closing. |
Isn't there any news about the |
@SiaQnbr: no news beyond what you see here |
@choumx that does not seem like a decent reason for closure of a ticket, especially for something that could be automated on publish w/ something like https://github.com/urish/typewiz to at least provide something to devs. |
@markhughes It seems like you have some familiarity with the relevant tooling here, so if you have an idea for a useful and non-intrusive way to address this, feel free to put a PR together and add myself/ |
My comment was not about migrating to typescript on the spot. That was about adding typescript types. For example: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/auth0 This would allow developers using TypeScript to use the package without the package actually migrating to typescript. |
@markhughes: Can you explain more? In general, developers using AMP to build websites don't directly consume AMP JS APIs. They use our Web Components instead, e.g. <amp-list> ... </amp-list> I don't think TypeScript does html type-checking |
@samouri But there is frameworks that support amp, like Nextjs: |
Turns out DevTools did something very similar in 2020. They also had a Closure Compiler-based JS repo and migrated to TS. They also wrote a post-hoc blog post. |
I did some exploration into using TypeScript to type check the The compiler options are identical to those used in This is the output of the command. |
@rileyajones See #34096 and #32693 for related work. |
Just realized this issue was already closed...but in fact, the FR is now complete as we are free to begin authoring TypeScript files. See #37370 as the first example. |
Add TypeScript support to AMP and allow new extensions to be written in TypeScript.
Motivation
Given the increasing maturity and popularity of TypeScript and potential developer productivity benefits, we'd like to experiment with TypeScript support in AMP.
Requirements
Proposal
The text was updated successfully, but these errors were encountered: