←back to thread

517 points bkolobara | 1 comments | | HN request time: 0s | source
Show context
gedy ◴[] No.45042251[source]
> Assigning a value to 'window.location.href' doesn't immediately redirect you, like I thought it would.

That's not a "Typescript" or language issue, that's a DOM/browser API weirdness

replies(3): >>45042856 #>>45043364 #>>45045727 #
1. ChadNauseam ◴[] No.45045727[source]
You could argue that the DOM API being weird is partially because typescript didn't exist when they came up with the API, so the API wasn't designed with typescript in mind. If the DOM API was written against Rust, the API could have been designed against Rust's type system to make this error more difficult.