chore: wip #74
Annotations
3 errors
error: expect(received).toBe(expected):
test/dts.test.ts#L31
Expected: "import type { DtsGenerationOption, DtsGenerationConfig } from '@stacksjs/dtsx';\nimport type { BunPlugin } from 'bun';\nimport { generate } from '@stacksjs/dtsx';\n\n/**\n * Example of const declaration\n */\nexport declare const conf: { [key: string]: string };\n\nexport declare const someObject: {\n someString: 'Stacks';\n someNumber: 1000;\n someBoolean: true;\n someFalse: false;\n someFunction: Function;\n anotherOne: Function;\n someArray: Array<any>;\n someNestedArray: Array<any>;\n someComplexArray: Array<any>;\n someObject: Object;\n someNestedObject: Object;\n someNestedObjectArray: Array<any>;\n someOtherObject: Object;\n someInlineCall2: Function;\n someInlineCall3: Function;\n};\n\n/**\n * Example of interface declaration\n * with another comment in an extra line\n */\nexport declare interface User {\n id: number;\n name: string;\n email: string;\n}\n\n/**\n * Example of type declaration\n *\n * with multiple lines of comments, including an empty line\n */\nexport declare interface ResponseData {\n success: boolean;\n data: User[];\n}\n\n/**\n * Example of function declaration\n *\n *\n * with multiple empty lines, including an empty lines\n */\nexport declare function fetchUsers(): Promise<ResponseData>;\n\nexport declare interface ApiResponse<T> {\n status: number;\n message: string;\n data: T;\n}\n\n/**\n * Example of another const declaration\n *\n* with multiple empty lines, including being poorly formatted\n */\ndeclare const settings: {\n theme: 'dark';\n language: 'en';\n}\n\nexport declare interface Product {\n id: number;\n name: string;\n price: number;\n}\n\n/**\n * Example of function declaration\n */\nexport declare function getProduct(id: number): Promise<ApiResponse<Product>>;\n\nexport declare interface AuthResponse {\n token: string;\n expiresIn: number;\n}\n\nexport declare type AuthStatus = 'authenticated' | 'unauthenticated';\n\nexport declare function authenticate(user: string, password: string): Promise<AuthResponse>;\n\nexport declare const defaultHeaders: {\n 'Content-Type': string;\n};\n\nexport declare function dts(options?: DtsGenerationOption): BunPlugin;\n\ndeclare interface Options<T> {\n name: string;\n cwd?: string;\n defaultConfig: T;\n}\n\nexport declare function loadConfig<T extends Record<string, unknown>>(options: Options<T>): Promise<T>;\n\ndeclare const dtsConfig: {\n name: 'dts';\n cwd: process.cwd();\n defaultConfig: {\n root: './src';\n entrypoints: ['**/*.ts'];\n outdir: './dist',\n keepComments: true,\n clean: true,\n tsconfigPath: './tsconfig.json',\n },\n root: './src',\n entrypoints: ['**/*.ts'],\n outdir: './dist',\n keepComments: true,\n clean: true,\n tsconfigPath: './tsconfig.json',\n}\n\n// declare const dtsConfig: DtsGenerationConfig;\n\nexport { generate, dtsConfig };\n\nexport type { DtsGenerationOption };\n\nexport { config } from './config';\nexport * from './extract';\nexport * from './generate';\nexport * from './types';\nexport * from './utils';\n\nexport default dts;\n"
Received: "import type { BunPlugin } from 'bun'\nimport process from 'node:process'\nimport { generate, deepMerge } from '@stacksjs/dtsx'\nimport type { DtsGenerationConfig, DtsGenerationOption } from '@stacksjs/dtsx'\nimport { existsSync } from 'node:fs'\nimport { resolve } from 'node:path'\n/**\n * Example of const declaration\n */\nexport declare const conf: { [key: string]: string };\nexport declare const someObject: {\n someString: 'Stacks';\n someNumber: 1000;\n someBoolean: true;\n someFalse: false;\n someFunction: Function;\n anotherOne: Function;\n someArray: Array<any>;\n someNestedArray: Array<any>;\n someOtherNestedArray: Array<any>;\n someComplexArray: Array<any>;\n someObject: Object;\n someNestedObject: Object;\n key: Object;\n nestedKey: 'value';\n otherKey: Object;\n nestedKey: Object;\n nestedKey2: Function;\n someNestedObjectArray: Array<any>;\n someOtherObject: Object;\n someInlineCall2: Object;\n someInlineCall3: Object;\n};\n/**\n * Example of interface declaration\
|
typecheck
Process completed with exit code 2.
|
lint
Process completed with exit code 1.
|