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

Safely override .kind and Buffer improvements #367

Merged
merged 11 commits into from
Oct 17, 2024
Merged

Conversation

daogrady
Copy link
Contributor

@daogrady daogrady commented Oct 16, 2024

Only add override modifier to kind property iff any parent class actually has such a property to override.
This change is implicitly tested by having added strict: true to the transpilation tests in tscheck.js.
Fixes #273

Generally, the creation of class members has been streamlined to avoid typos and incorrect order/ combination of modifiers via lib/components.class::createMember instead of concatenating strings manually.

Also streamlined use of Buffer.add to accept scalar strings, array of strings, and functions returning strings, to enable buffer.add(xs) over xs.forEach(x => buffer.add(x)).
Also added buffer.blankLine() to replace the somewhat obscure buffer.add('')

@daogrady daogrady mentioned this pull request Oct 16, 2024
@daogrady daogrady changed the title Streamline use of buffer and stringification of member generation Safely override .kind and Buffer improvements Oct 16, 2024
@daogrady daogrady requested a review from chgeo October 17, 2024 06:37
lib/resolution/entity.js Show resolved Hide resolved
@daogrady daogrady merged commit d29aed3 into main Oct 17, 2024
11 checks passed
@daogrady daogrady deleted the fix/override-kind branch October 17, 2024 07: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.

[BUG][REGRESSION] TS4114 error introduced in v0.23.0
2 participants