l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

index.d.ts (501B)


      1 export interface FrontMatterResult<T> {
      2   readonly attributes: T
      3   readonly body: string
      4   readonly bodyBegin: number;
      5   readonly frontmatter?: string
      6 }
      7 
      8 export interface FrontMatterOptions {
      9   /**
     10    * Whether to use [safeload](https://github.com/nodeca/js-yaml#safeload-string---options-)
     11    * @default true
     12    */
     13   allowUnsafe?: boolean
     14 }
     15 
     16 interface FM {
     17   <T>(file: string, options?: FrontMatterOptions): FrontMatterResult<T>
     18   test(file: string): boolean
     19 }
     20 
     21 declare const fm: FM
     22 export default fm