[wp-trac] [WordPress Trac] #61399: HTML API: Add type annotations
WordPress Trac
noreply at wordpress.org
Thu Jun 27 14:22:29 UTC 2024
#61399: HTML API: Add type annotations
-------------------------+-----------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: HTML API | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+-----------------------------
Comment (by jonsurrell):
@dmsnell and I talked about this. @dmsnell shared concerns around this
causing crashes on sites and wanting to be careful. These are valid.
We discussed introducing type annotations on places that should be safe,
meaning that they can't introduce new crashes.
- Private methods may be safe to annotate completely.
- Return types should be safe to annotate.
- Public method ''arguments'' are more risky to type and we'll avoid them
for now. It's relatively easy to pass values of the wrong type and
introduce runtime errors.
I'll adapt [https://github.com/WordPress/wordpress-develop/pull/6753
PR#6753] accordingly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61399#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list