mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-28 16:45:10 +08:00
10 lines
307 B
TypeScript
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;
|