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 https://github.com/cap-js/cds-typer/issues/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('')
Only add
override
modifier tokind
property iff any parent class actually has such a property to override. This change is implicitly tested by having addedstrict: true
to the transpilation tests intscheck.js
. Fixes https://github.com/cap-js/cds-typer/issues/273Generally, 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 enablebuffer.add(xs)
overxs.forEach(x => buffer.add(x))
. Also addedbuffer.blankLine()
to replace the somewhat obscurebuffer.add('')