TypeScript types and TS doc (or JS doc) can serve as accurate, up-to-date documentation embedded directly in the code. This approach ensures users get the correct information for the version they are using without needing a separate documentation site.