DefinitelyTyped / DefinitelyTyped/DefinitelyTyped
[@types/query-string]
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 51.4k
- Forks
- 30.4k
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 108
Description
If you know how to fix the issue, make a pull request instead.
- I tried using the
@types/query-stringpackage and had problems. - I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
- I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
- Mention the authors (see
Definitions by:inindex.d.ts) so they can respond.- Authors: @SamVerschueren @tkrotoff @huhuanming @MadaraUchiha @shssoichiro
Just a small improvement suggestion.
export interface OutputParams {
[key: string]: string | string[] | undefined;
}
export function parse<T = OutputParams>(str: string, options?: ParseOptions): T;
export function parseUrl<T = OutputParams>(str: string, options?: ParseOptions): {url: string, query: T};
Usage example:
type MyQuery = {
foo: string;
bar: string;
}
const query = qs.parse<MyQuery>(location.search);
And the IDE can suggest the query object's properties.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the @types/query-string index.d.ts definition mentioned in the issue and inspect the current parse and parseUrl declarations. Add the proposed generic query type signatures so callers can provide MyQuery and receive typed properties; confirm the declarations match the usage example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100