Files
DefinitelyTyped/types/detect-indent/detect-indent-tests.ts

10 lines
307 B
TypeScript

import detectIndent = require('detect-indent');
const indent = detectIndent('').indent || ' ';
const indentInfo = detectIndent('');
indentInfo; // $ExpectType IndentInfo
const num: number = indentInfo.amount;
const str: string = indentInfo.indent;
const type: 'space' | 'tab' | null = indentInfo.type;