File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
libs/execution/src/lib/types/io-types Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,21 @@ export class TableColumn<
3333 clone ( ) : TableColumn < T > {
3434 const cloned : ( T | InternalErrorValueRepresentation ) [ ] = [ ] ;
3535 for ( const value of this . values ) {
36+ // WARNING: structuredClone has unintuitive behavior for Error subclasses.
37+ //
38+ // structuredClone replaces our custom Error's `name` field with
39+ // `"Error"`, which leads to future type checks failing, even though they
40+ // should not.
41+ //
42+ // TODO: Decide whether to implement a custom clone for
43+ // InternalValidValueRepresentation. This may require disabling nested
44+ // arrays.
45+ //
46+ // More information:
47+ // https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types
3648 if ( ERROR_TYPEGUARD ( value ) ) {
3749 cloned . push ( value . clone ( ) ) ;
3850 } else {
39- // WARNING: structuredClone does not support all types!
40- // See
41- // https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types
4251 cloned . push ( structuredClone ( value ) ) ;
4352 }
4453 }
You can’t perform that action at this time.
0 commit comments