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

defineConfig return type #1381

Merged
merged 2 commits into from
Mar 12, 2024
Merged

defineConfig return type #1381

merged 2 commits into from
Mar 12, 2024

Conversation

frenzzy
Copy link
Contributor

@frenzzy frenzzy commented Mar 12, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • infrastructure changes
  • Other... Please describe: typing

What is the current behavior?

defineConfig returns any

What is the new behavior?

defineConfig returns router

Other information

This should allow to extend router, example:

const app = defineConfig({
  server: {
    experimental: {
      websocket: true,
    },
  },
});

// Currently:
// Unsafe call of an `any` typed
// value.eslint[@typescript-eslint/no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
app.addRouter({
  name: "websocket",
  type: "http",
  handler: "./src/websocket.ts",
  target: "server",
  base: "/_ws",
});

export default app;

Copy link

changeset-bot bot commented Mar 12, 2024

🦋 Changeset detected

Latest commit: 1ec0e21

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ryansolid
Copy link
Member

Thank you

@ryansolid ryansolid merged commit 13c3530 into solidjs:main Mar 12, 2024
1 check passed
@frenzzy frenzzy deleted the patch-2 branch March 12, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants