Skip to content

feat: add array type support for query parameters#113

Open
jin-sir wants to merge 2 commits into
DTStack:masterfrom
jin-sir:feat_generateUrlWithQuery
Open

feat: add array type support for query parameters#113
jin-sir wants to merge 2 commits into
DTStack:masterfrom
jin-sir:feat_generateUrlWithQuery

Conversation

@jin-sir

@jin-sir jin-sir commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

变更内容

  • 在支持的值类型列表中添加 'array' 类型
  • 数组会通过 String(value) 转换为字符串

变更原因

  • 支持常见用法,如 generateUrlWithQuery('/api', { ids: [1, 2, 3] })

@jin-sir jin-sir force-pushed the feat_generateUrlWithQuery branch from 0f0e2a3 to 3b15ce5 Compare June 17, 2026 13:08
@jin-sir jin-sir requested a review from liuxy0551 June 17, 2026 13:39
Comment thread src/generateUrlWithQuery/__test__/index.test.ts
Comment thread src/generateUrlWithQuery/index.ts Outdated
Comment thread src/generateUrlWithQuery/index.ts Outdated
Comment thread src/generateUrlWithQuery/index.ts
- Add any[] to QueryValue type definition
- Add tests for empty, nested, mixed-type, and complex arrays
- Update JSDoc examples with array usage scenarios
- Filter out empty string values from array conversion
@jin-sir jin-sir force-pushed the feat_generateUrlWithQuery branch from 5971185 to 6f6810b Compare June 18, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants