Closed jesup closed 1 year ago
While not perfect, https://fs.spec.whatwg.org/#entry-resolve (which the one line of definition you mention links to) does seem like a fairly complete definition? Of course I wouldn't expect any implementation to actually implement the algorithm as written (since that would probably be the least efficient way of implementing the operation), but I do believe the normative language does do a fairly complete job of describing the exact desired behavior.
Aha. What surprised me was that "resolving" (invoked by reference there) wasn't in the resolve() definition -- and "resolving" is only referenced from resolve() (and from itself). Perhaps it should just be moved to resolve()...
It seems reasonable to move it within the resolve()
method algorithm since it's only referenced there... though I expect we may need to re-using this definition in some upcoming work, in which case we'd have to move the definition back to where it is now. I personally don't think it's worth the effort, but if you put up a PR to move the definition I'm happy to approve it.
There's only a single line of normative definition for resolve() (which per other discussion here should be renamed). The non-normative language is fairly complete.