tinytime icon indicating copy to clipboard operation
tinytime copied to clipboard

TypeScript Support ?

Open robertu7 opened this issue 6 years ago • 2 comments

Maybe need a definition file index.d.ts

robertu7 avatar Feb 15 '19 05:02 robertu7

declare module 'tinytime' {
  interface TinyTime {
    render: (date: Date) => string
  }

  interface TinyTimeOptions {
    padHours?: boolean
    padDays?: boolean
    padMonth?: boolean
  }

  declare const tinytime: (
    template: string,
    options: TinyTimeOptions = {}
  ) => TinyTime

  export default tinytime
}

robertu7 avatar Feb 15 '19 05:02 robertu7