Skip to content

Add a .d.ts file…#9

Draft
savetheclocktower wants to merge 6 commits into
masterfrom
add-d-ts
Draft

Add a .d.ts file…#9
savetheclocktower wants to merge 6 commits into
masterfrom
add-d-ts

Conversation

@savetheclocktower

Copy link
Copy Markdown

…and some tests to ensure the .d.ts document everything in the Repository interface (and nothing that isn't there).

This one builds on #8 and thus will stay in draft until that PR lands.

I was looking for ways to add inline documentation for this module. Ordinarily I'd prefer to write JSDoc comments and then use tooling to generate a .d.ts from that… but git-utils defines some methods in JS and some methods in the native C++ bindings. Hence there's no place to hang a JSDoc comment for about half the methods.

Instead, I've hand-authored a .d.ts file. To ensure that the definitions are in sync with what actually exists in the repo, there's a new spec/api-surface-spec.js suite that inspects the .d.ts and the Repository class and ensures they agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant