arson icon indicating copy to clipboard operation
arson copied to clipboard

TypeScript signatures

Open stereobooster opened this issue 4 years ago • 0 comments

declare module 'arson' {
  export type ARSONValue =
    | string
    | number
    | boolean
    | null
    | RegExp
    | Date
    | Buffer
    | Map<ARSONValue, ARSONValue>
    | Set<ARSONValue>
    | ARSONValue[]
    | { [key: string]: ARSONValue }

  type Serializer<S> = {
    parse: (x: string) => S
    stringify: (x: S) => string
  }

  export default Serializer<ARSONValue>
}

stereobooster avatar Jun 27 '21 18:06 stereobooster