> like the Document APIs?

Yeah, the DOM in the browser, node APIs in nodejs, etc.

> especially if it was faster

Well, that's the thing. Initially it'll be slower, 'cause the code you call, and that calls you will be mostly unsound.

Unless you can run the sound code without the soundness checks at boundaries, at which point it becomes harder to reason about, and you'll be tempted to add some additional runtime checks to your code that the type system should catch.