We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
untyped
node v18.18.0 unbuild v2.0.0
Create a new project with this config:
import { defineBuildConfig } from 'unbuild' export default defineBuildConfig({ entries: [ 'src/index.ts', { builder: 'untyped', input: 'src/index.ts', outDir: 'docs', name: 'examples', } ], declaration: true, rollup: { emitCJS: true, } })
and this simple file src/index.ts
src/index.ts
export function main(data: string): string { return `Hello ${data}!` }
The markdown and the .d.ts file generated by untyped are
.d.ts
# `main` - **Type**: `function` - **Default**: `undefined` ```ts () => any
export interface ExamplesSchema { main: () => any, }
But I expect more something like this
export interface Untyped { main: (data: string) => string, }
# `main` - **Type**: `function` ```ts (data: string) => string
https://untyped.unjs.io/#eyJlZGl0b3JUYWIiOiJyZWZlcmVuY2UiLCJvdXRwdXRUYWIiOiJ0eXBlcyIsInJlZiI6ImV4cG9ydCBmdW5jdGlvbiBtYWluKGRhdGE6IHN0cmluZyk6IHN0cmluZyB7XG4gIHJldHVybiBgSGVsbG8gJHtkYXRhfSFgXG59XG4iLCJpbnB1dCI6ImV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgbmFtZTogJ2ZvbycsXG4gICAgZGltZW5zaW9uczoge1xuICAgICAgICBoZWlnaHQ6IDI1XG4gICAgfSxcbiAgICB0YWdzOiBbJ2N1c3RvbSddXG59In0=
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
node v18.18.0
unbuild v2.0.0
Reproduction
Create a new project with this config:
and this simple file
src/index.ts
Describe the bug
The markdown and the
.d.ts
file generated by untyped areBut I expect more something like this
https://untyped.unjs.io/#eyJlZGl0b3JUYWIiOiJyZWZlcmVuY2UiLCJvdXRwdXRUYWIiOiJ0eXBlcyIsInJlZiI6ImV4cG9ydCBmdW5jdGlvbiBtYWluKGRhdGE6IHN0cmluZyk6IHN0cmluZyB7XG4gIHJldHVybiBgSGVsbG8gJHtkYXRhfSFgXG59XG4iLCJpbnB1dCI6ImV4cG9ydCBjb25zdCBjb25maWcgPSB7XG4gICAgbmFtZTogJ2ZvbycsXG4gICAgZGltZW5zaW9uczoge1xuICAgICAgICBoZWlnaHQ6IDI1XG4gICAgfSxcbiAgICB0YWdzOiBbJ2N1c3RvbSddXG59In0=
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: