@cap-js/cds-typer
Advanced tools
Changelog
[0.33.0] - 2025-02-10
cds.Map
type, which is emitted as {[key:string]: unknown}
. The most appropriate type would in fact be {[key:string]: any}
, which would also allow any and all keys. But would also cause issues with strict project configurations. Therefore, to effectively use cds.Map
, users will have to cast the unknown
s to the effective type they expect.cds.env.typer.build_task
to allow disabling the typescript
build task shipped with cds-typer by setting it to false
cds.Binary
and cds.LargeBinary
are now generated as Buffer
and Readable
respectively to reflect the behaviour of the new database packages @cap-js/hana
and @cap-js/sqlite
. You can switch back to the old behaviour by adding legacy_binary_types: true
to your project configuration.CHANGELOG.md
and LICENSE
files are no longer part of the npm package.Changelog
[0.32.1] - 2025-01-20
inline_declarations
in help commandChangelog
[0.32.0] - 2025-01-14
localized
elementsPromise
and Record
with globalThis.
, to allow using names of builtin types for entities without collisions@cap-js/cds-types
to >=0.9
cds.String
in an enum will now properly quote the generated valuesChangelog
[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, ...})
).