DefinitelyTyped/types/parse-passwd/parse-passwd-tests.ts
2018-12-31 08:32:14 -08:00

15 lines
436 B
TypeScript

import parse = require('parse-passwd');
const entries = parse('doowb:*:123:123:Brian Woodward:/Users/doowb:/bin/bash');
entries; // $ExpectType PasswdEntry[]
const entry = entries[0];
entry.username; // $ExpectType string
entry.password; // $ExpectType string
entry.uid; // $ExpectType string
entry.gid; // $ExpectType string
entry.gecos; // $ExpectType string
entry.homedir; // $ExpectType string
entry.shell; // $ExpectType string