text: 'use strict';
  
  import os from 'os';
  
  export const HEADER = `// @flow strict
  /* This file is automatically generated by css-modules-flow-types */`;
  
  export const EOL = {
    LF: '\n',
    CRLF: '\r\n',
  };
  
  export function getLineSeparator(content) {
    if (typeof content !== 'string') return os.EOL;
    if (content.includes(EOL.CRLF)) return EOL.CRLF;
    if (content.includes(EOL.LF)) return EOL.LF;
    return os.EOL;
  }
  
  export default function printFlowDefinition(
    tokensArray,
    eol = os.EOL,
    indent = '  '
  ) {
    const props = tokensArray
      .sort()
      .map(key => `${indent}+'${key}': string,`)
      .join(eol);
  
    return `${HEADER}
  declare module.exports: {|
  ${props}
  |};
  `;
  }
  