Skip to content

Commit 0c14bcb

Browse files
llwtanho
andauthored
fix(release): remove unnecessary number from release return type (#34481)
## Current Behavior The `release` function returned by `createAPI` has a return type of `Promise<NxReleaseVersionResult | number>`. The `| number` union member is inaccurate since the function always returns `NxReleaseVersionResult`, which can mislead consumers of the programmatic API. ## Expected Behavior The return type is narrowed to `Promise<NxReleaseVersionResult>`, accurately reflecting what the function actually returns and giving API consumers correct type information. Co-authored-by: Andreas Hörnicke <andreas.hoernicke@contentful.com>
1 parent 08d899a commit 0c14bcb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/nx/src/command-line/release/release.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function createAPI(
6060

6161
return async function release(
6262
args: ReleaseOptions
63-
): Promise<NxReleaseVersionResult | number> {
63+
): Promise<NxReleaseVersionResult> {
6464
const projectGraph = await createProjectGraphAsync({ exitOnError: true });
6565
const overriddenConfig = overrideReleaseConfig ?? {};
6666
const userProvidedReleaseConfig = ignoreNxJsonConfig

0 commit comments

Comments
 (0)