mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-29 02:50:32 +00: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;
|