mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
10 lines
426 B
TypeScript
10 lines
426 B
TypeScript
|
|
import { urlToProperty, urlToList, propertyToUrl } from 'query-string-params';
|
||
|
|
|
||
|
|
urlToProperty(''); // $ExpectType SearchParamOptions
|
||
|
|
urlToList(''); // $ExpectType SearchParamOptions[]
|
||
|
|
propertyToUrl({}); // $ExpectType string
|
||
|
|
|
||
|
|
urlToProperty('foo=x,y&bar=z'); // $ExpectType SearchParamOptions
|
||
|
|
urlToList('foo=x,y&bar=z'); // $ExpectType SearchParamOptions[]
|
||
|
|
propertyToUrl({ foo: ['a', 'b'], bar: ['c'] }); // $ExpectType string
|