Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/api-extractor/post-rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ async function post (preResults) {
rollup += filterFile
}

// put all exports into an augmented module declaration. Remove all "declare" modifiers
// as they will now already be in an ambient context
rollup = rollup.replaceAll('declare ','')
rollup = rollup
// remove all "declare" modifiers as they will now already be in an ambient context
.replaceAll('declare ','')
// put cds-dk into the cds-namespace as well, to be included in the default export
.replaceAll(/^namespace cds {$/gm, 'namespace cds { export * from "@sap/cds-dk";')
rollup = 'export * from "@sap/cds-dk";\n' + rollup // add cds-dk back in we had to remove in pre()
// put all exports into an augmented module declaration.
rollup = `declare module '@sap/cds' {\n${rollup}\n}`

await writeFile(rollupFile, rollup)
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
### Added
- Types for compile events: `compile.for.runtime`, `compile.to.dbx`, `compile.to.edmx`
### Changed
- Types for `@sap/cds-dk` are now also available from the default export, if the package is intalled.
### Deprecated
### Removed
### Fixed
Expand Down
Loading