Skip to content

Commit c6c893a

Browse files
authored
fix(isolated decl): get the build to run (#227)
1 parent d1d5906 commit c6c893a

File tree

4 files changed

+345
-623
lines changed

4 files changed

+345
-623
lines changed

build.preset.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,11 @@ export default definePreset({
1111
esbuild: {
1212
minify: true,
1313
},
14+
dts: {
15+
// rollup-plugin-dts doesnt forward tsconfig's "include"
16+
// field to tsc, which prompts tsc to incorrectly believe
17+
// that the "composite" constraints are unmet.
18+
compilerOptions: { composite: false }
19+
}
1420
},
1521
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@changesets/cli": "^2.26.2",
2020
"@types/node": "^18.16.0",
2121
"typescript": "^5.7.2",
22-
"unbuild": "^2.0.0",
22+
"unbuild": "^3.2.0",
2323
"unplugin-isolated-decl": "^0.10.2"
2424
},
2525
"packageManager": "[email protected]",

packages/core/src/prompts/prompt.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default class Prompt {
5656
/**
5757
* Unsubscribe all listeners
5858
*/
59-
protected unsubscribe() {
59+
protected unsubscribe(): void {
6060
this._subscribers.clear();
6161
}
6262

@@ -78,7 +78,7 @@ export default class Prompt {
7878
* @param event - The event name
7979
* @param cb - The callback
8080
*/
81-
public on<T extends keyof ClackEvents>(event: T, cb: ClackEvents[T]) {
81+
public on<T extends keyof ClackEvents>(event: T, cb: ClackEvents[T]): void {
8282
this.setSubscriber(event, { cb });
8383
}
8484

@@ -87,7 +87,7 @@ export default class Prompt {
8787
* @param event - The event name
8888
* @param cb - The callback
8989
*/
90-
public once<T extends keyof ClackEvents>(event: T, cb: ClackEvents[T]) {
90+
public once<T extends keyof ClackEvents>(event: T, cb: ClackEvents[T]): void {
9191
this.setSubscriber(event, { cb, once: true });
9292
}
9393

@@ -96,7 +96,7 @@ export default class Prompt {
9696
* @param event - The event name
9797
* @param data - The data to pass to the callback
9898
*/
99-
public emit<T extends keyof ClackEvents>(event: T, ...data: Parameters<ClackEvents[T]>) {
99+
public emit<T extends keyof ClackEvents>(event: T, ...data: Parameters<ClackEvents[T]>): void {
100100
const cbs = this._subscribers.get(event) ?? [];
101101
const cleanup: (() => void)[] = [];
102102

@@ -113,7 +113,7 @@ export default class Prompt {
113113
}
114114
}
115115

116-
public prompt() {
116+
public prompt(): Promise<string | symbol> {
117117
return new Promise<string | symbol>((resolve, reject) => {
118118
if (this._abortSignal) {
119119
if (this._abortSignal.aborted) {
@@ -229,7 +229,7 @@ export default class Prompt {
229229
}
230230
}
231231

232-
protected close() {
232+
protected close(): void {
233233
this.input.unpipe();
234234
this.input.removeListener('keypress', this.onKeypress);
235235
this.output.write('\n');

0 commit comments

Comments
 (0)