@cap-js/cds-typer
Advanced tools
Changelog
[0.31.0] - 2024-12-16
/index.js
-suffix to conform to modern module resolution mechanismstarget_module_type
at 'auto'
now properly acts on a detected "type":"module"
composition of many
Changelog
[0.30.0] - 2024-12-02
outputDirectory
option will be ./@cds-models
instead of ./
. This default takes the lowest precedence after setting it in the project's cds.env
, or explicitly as CLI argument.outputDirectory
, which would also cause an issue during buildChangelog
[0.29.0] - 2024-11-20
--targetModuleType
option. If you rely on these generated index.js files to be CJS despite your project being of ESM type, you need to manually tell cds-typer to generate CJS files!.keys
property now properly reels in key types from inherited classes.Changelog
[0.28.1] - 2024-11-07
cds build
no longer fails on Windows with an EINVAL
error.cds build
also supports custom model paths in tsconfig.json
that do not end with /index.ts
. This is the case for projects running with tsx
.Changelog
[0.28.0] - 24-10-24
cds.typer
options in package.json
and .cdsrc-*.json
fileselements
property to all entities, which allows access to the LinkedDefinitions
instance of an entity's elementstypescript
cds build task..drafts
property of any entity E
is now of type DraftOf<E>
, or DraftsOf<E>
for plurals, respectively. This type exposes dditional properties that are available on drafts during runtime.--inlineDeclarations flat
override
modifier on .kind
property is now only generated if the property is actually inherited, satisfying strict tsconfig.json
snot null
) action parameters with array of
types.drafts
is only create for entity classes that are actually draft enabledChangelog
[0.27.0] - 2024-10-02
cds.env
) can now be passed in snake_case in addition to camelCasenot null
in CDS/CDL, or notNull
in CSN.'.'
for --outputDirectory
Changelog
[0.26.0] - 2024-09-11
.keys
property in all entities. That property is dictionary which holds all properties as keys that are marked as key
in CDS--useEntitiesProxy
. When set to true
, all entities are wrapped into Proxy
objects during runtime, allowing top level imports of entity types..kind
property for entities and types, which contains 'entity'
or 'type'
respectively@sap/cds
version 8.2
or higher.@cap-js/cds-types
version 0.6.4
or higher.service.action({one, two})
and service.action(one, two)
.service.action({one:1, ...})
).Changelog
[0.25.0] - 2024-08-13
declare
modifier to pass strict tsconfigs using useDefineForClassFields
or noImplicitOverride
actions
property of generated classes now includes the types from all inherited classes to also suggest actions defined in a base entity/aspect/type.Changelog
[0.24.0] - 2024-07-18
cds build
no longer looks for tsconfig.json to determine if the project has TS nature and instead checks the dependencies in the project's package.json for an occurrence of typescript