mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* added the parse-full-name types * updated module to not have exported functions and types * exported the guts of the types as opposed to a single module * fixed some tests and added a comment for only supporting typescript 3.0 * whoops had a ' that shouldn't have been there Co-authored-by: n8 <n8@dwell.management>
12 lines
472 B
TypeScript
12 lines
472 B
TypeScript
import { Name, parseFullName } from "parse-full-name";
|
|
|
|
const parsedName: Name = parseFullName('john doe sr');
|
|
|
|
parsedName.first; // $ExpectType string | undefined
|
|
parsedName.middle; // $ExpectType string | undefined
|
|
parsedName.last; // $ExpectType string | undefined
|
|
parsedName.nick; // $ExpectType string | undefined
|
|
parsedName.suffix; // $ExpectType string | undefined
|
|
parsedName.title; // $ExpectType string | undefined
|
|
parsedName.error; // $ExpectType [] | undefined
|