Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReturnType of CommitBaseWithFiles incorrect #82

Open
ninesunsabiu opened this issue Jun 23, 2022 · 0 comments
Open

ReturnType of CommitBaseWithFiles incorrect #82

ninesunsabiu opened this issue Jun 23, 2022 · 0 comments

Comments

@ninesunsabiu
Copy link

node-gitlog/src/index.ts

Lines 312 to 315 in 617373e

type CommitBaseWithFiles<Field extends string> = Record<
Field | "status",
string
> & { files: string[] };

the type of CommitBaseWithFiles['status'] is string, but it is Array<string> in fact.

node-gitlog/src/index.ts

Lines 209 to 214 in 617373e

if (nameStatus) {
// Create arrays for non optional fields if turned on
notOptFields.forEach((d) => {
parsed[d] = [];
});
}

The code here proves this as well

@ninesunsabiu ninesunsabiu mentioned this issue Jun 23, 2022
3 tasks
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

No branches or pull requests

1 participant