Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(isolated decl): get the build to run #227

Merged
Merged
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
6 changes: 6 additions & 0 deletions build.preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ export default definePreset({
esbuild: {
minify: true,
},
dts: {
// rollup-plugin-dts doesnt forward tsconfig's "include"
// field to tsc, which prompts tsc to incorrectly believe
// that the "composite" constraints are unmet.
compilerOptions: { composite: false }
}
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@changesets/cli": "^2.26.2",
"@types/node": "^18.16.0",
"typescript": "^5.7.2",
"unbuild": "^2.0.0",
"unbuild": "^3.2.0",
"unplugin-isolated-decl": "^0.10.2"
},
"packageManager": "[email protected]",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/prompts/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class Prompt {
/**
* Unsubscribe all listeners
*/
protected unsubscribe() {
protected unsubscribe(): void {
this._subscribers.clear();
}

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

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

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

Expand All @@ -113,7 +113,7 @@ export default class Prompt {
}
}

public prompt() {
public prompt(): Promise<string | symbol> {
return new Promise<string | symbol>((resolve, reject) => {
if (this._abortSignal) {
if (this._abortSignal.aborted) {
Expand Down Expand Up @@ -229,7 +229,7 @@ export default class Prompt {
}
}

protected close() {
protected close(): void {
this.input.unpipe();
this.input.removeListener('keypress', this.onKeypress);
this.output.write('\n');
Expand Down
Loading
Loading