tc39 / proposal-record-tuple

ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!
https://tc39.es/proposal-record-tuple/
2.48k stars 62 forks source link

Removal of `Record.isRecord` & `Tuple.isTuple` #335

Closed rricard closed 2 years ago

rricard commented 2 years ago

Per #333 - Record.isRecord & Tuple.isTuple should not be checking for wrappers as discussed in plenary.

They are now equivalent as using typeof so they are not useful anymore: we should probably remove them.

ljharb commented 2 years ago

While this is fine, do note that because it requires try/catch (which the predicate doesn’t) this necessitates a userland abstraction/package which wasn’t previously necessary.