mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
14 lines
443 B
TypeScript
14 lines
443 B
TypeScript
import parsePath = require('parse-path');
|
|
|
|
const parsed = parsePath('http://www.example.com');
|
|
|
|
parsed.hash; // $ExpectType string
|
|
parsed.href; // $ExpectType string
|
|
parsed.pathname; // $ExpectType string
|
|
parsed.port; // $ExpectType number | null
|
|
parsed.protocol; // $ExpectType Protocol
|
|
parsed.protocols; // $ExpectType Protocol[]
|
|
parsed.resource; // $ExpectType string
|
|
parsed.search; // $ExpectType string
|
|
parsed.user; // $ExpectType string
|