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

Better typing; no more any #63

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Better typing; no more any #63

merged 1 commit into from
Dec 6, 2024

Conversation

nathanb
Copy link
Contributor

@nathanb nathanb commented Dec 6, 2024

  • dropping implicit any
  • typing some interfaces
  • replacing any (data) with unknown
  • minor updates
  • dep to version ^1

Comment on lines -44 to -52
let header = fieldKeys.reduce((line, fieldKey) => {
const field = fields[fieldKey]
let header = ''
for (let ix = 0; ix < fields.length; ix++) {
const field = fields[ix]
const label = field.label || field.name
if (line === 'START') {
line = ''
} else {
line += fieldSeparator
if (ix > 0) {
header += fieldSeparator
}
line += prepValue(label, field.quoted, fieldSeparator)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must've really liked reduce back then.

@nathanb nathanb marked this pull request as ready for review December 6, 2024 23:03
@nathanb nathanb merged commit ed55e9e into main Dec 6, 2024
14 checks passed
@nathanb nathanb deleted the drop-any branch December 6, 2024 23:16
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