-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa2ea83
commit 01dc5cb
Showing
9 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { BunPlugin } from 'bun'; | ||
import type { DtsGenerationOption } from '@stacksjs/dtsx'; | ||
export declare function fetchUsers(): Promise<ResponseData>; | ||
export declare function getProduct(id: number): Promise<ApiResponse<Product>>; | ||
export declare function authenticate(user: string, password: string): Promise<AuthResponse>; | ||
export declare function dts(options?: DtsGenerationOption): BunPlugin; | ||
declare const cwd: unknown; | ||
declare const c: unknown; | ||
declare const configPath: unknown; | ||
declare const importedConfig: unknown; | ||
declare const loadedConfig: unknown; | ||
export declare function processData(data: string): string; | ||
export declare function processData(data: number): number; | ||
export declare function processData(data: boolean): boolean; | ||
export declare function processData<T extends object>(data: T): T; | ||
export declare function processData(data: unknown): unknown; | ||
declare const results: unknown; | ||
export declare function isUser(value: unknown): value is User; | ||
export declare function extractFunctionSignature(declaration: string): FunctionSignature; | ||
declare const cleanDeclaration: unknown; | ||
declare const functionPattern: unknown; | ||
declare const functionMatch: unknown; | ||
declare const name: unknown; | ||
declare const genericsResult: unknown; | ||
declare const paramsResult: unknown; | ||
declare const match: unknown; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export class CustomError extends Error { | ||
constructor( | ||
message: string, | ||
public readonly code: number, | ||
public readonly metadata: Record<string, unknown> | ||
) { | ||
super(message) | ||
this.name = 'CustomError' | ||
} | ||
} | ||
|
||
export class CustomErrorWithMethod extends CustomError { | ||
logError() { | ||
console.error(`[${this.code}] ${this.message}`) | ||
} | ||
} | ||
|
||
export class CustomErrorWithMethodAndType extends CustomError { | ||
logError(): void { | ||
console.error(`[${this.code}] ${this.message}`) | ||
} | ||
|
||
getError(): Error { | ||
return this | ||
} | ||
} | ||
|
||
export class CustomErrorWithMethodAndTypeAndReturn { | ||
constructor( | ||
private message: string, | ||
public readonly code: number, | ||
public readonly metadata: Record<string, unknown> | ||
) { | ||
this.message = message | ||
this.code = code | ||
this.metadata = metadata | ||
} | ||
|
||
logError(): void { | ||
console.error(`[${this.code}] ${this.message}`) | ||
} | ||
|
||
getError(): Error { | ||
return new Error(this.message) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.