Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed May 8, 2023
1 parent 4f8918a commit a9700ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { CoreBindings as Bindings, LibraryAddresses, Wrapper as SolcWrapper } from './deps.ts'

// Taken from https://stackoverflow.com/a/68404823/11889402
type DotPrefix<T extends string> = T extends "" ? "" : `.${T}`
type DotPrefix<T extends string> = T extends '' ? '' : `.${T}`

type DotNestedKeys<T> = (T extends object ?
{ [K in Exclude<keyof T, symbol>]: `${K}${DotPrefix<DotNestedKeys<T[K]>>}` }[Exclude<keyof T, symbol>]
: "") extends infer D ? Extract<D, string> : never;
type DotNestedKeys<T> =
(T extends object
? { [K in Exclude<keyof T, symbol>]: `${K}${DotPrefix<DotNestedKeys<T[K]>>}` }[Exclude<keyof T, symbol>]
: '') extends infer D ? Extract<D, string> : never

type OutputSelection = DotNestedKeys<Omit<CompiledContract, 'abi'>> | 'abi' | '*' | 'ast'

Expand Down

0 comments on commit a9700ee

Please sign in to comment.