package: add --declaration to `tsc` compile step
index: make `string` public and `document` private