Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Nov 4, 2024
1 parent aeeb237 commit efd05fc
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 22 deletions.
44 changes: 22 additions & 22 deletions fixtures/wip/interface.ts → fixtures/input/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,26 @@ export interface DefaultGeneric<
/**
* Regular expression patterns used throughout the module
*/
interface RegexPatterns {
/** Import type declarations */
readonly typeImport: RegExp
/** Regular import declarations */
readonly regularImport: RegExp
/** Async function declarations */
readonly asyncFunction: RegExp
/** Generic type parameters */
readonly functionOverload: RegExp
/** Module declaration pattern */
readonly moduleDeclaration: RegExp
/**
* Module augmentation pattern
*/
readonly moduleAugmentation: RegExp
}
// interface RegexPatterns {
// /** Import type declarations */
// readonly typeImport: RegExp
// /** Regular import declarations */
// readonly regularImport: RegExp
// /** Async function declarations */
// readonly asyncFunction: RegExp
// /** Generic type parameters */
// readonly functionOverload: RegExp
// /** Module declaration pattern */
// readonly moduleDeclaration: RegExp
// /**
// * Module augmentation pattern
// */
// readonly moduleAugmentation: RegExp
// }

export interface ImportTrackingState {
typeImports: Map<string, Set<string>>
valueImports: Map<string, Set<string>>
usedTypes: Set<string>
usedValues: Set<string>
}
// export interface ImportTrackingState {
// typeImports: Map<string, Set<string>>
// valueImports: Map<string, Set<string>>
// usedTypes: Set<string>
// usedValues: Set<string>
// }
39 changes: 39 additions & 0 deletions fixtures/output/interface.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export declare interface User {
id: number
name: string
email: string
}
export declare interface ApiResponse<T> {
status: number
message: string
data: T
}
export declare interface ResponseData {
success: boolean
data: User[]
}
export declare interface Product {
id: number
name: string
price: number
}
export declare interface AuthResponse {
token: string
expiresIn: number
}
declare interface Options<T> {
name: string
cwd?: string
defaultConfig: T
}
export declare interface ComplexGeneric<T extends Record<string, unknown>, K extends keyof T> {
data: T
key: K
value: T[K]
transform: (input: T[K]) => string
nested: Array<Partial<T>>
}
export declare interface DefaultGeneric<
T = string,
K extends keyof any = string,
V extends Record<K, T> = Record<K, T>

0 comments on commit efd05fc

Please sign in to comment.