Open rafawendel opened 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
radash-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 24, 2024 6:36pm |
The built-in Capitalize
type does not match the behavior of Radash capitalize
.
type Foo = Capitalize<'foo Bar'>
// ^? 'Foo Bar'
let foo = _.capitalize('foo Bar')
// => 'Foo bar'
This PR improves the types of
capitalize
onstring.ts
Description
Instead of hardcoded
string
types, I've leveraged generic functions and TS'Capitalize
to infer the type for constant strings.Checklist
package.json
has been bumped (matching semver)yarn build
command has been run and to update thecdn
directory/docs
directory) has been updatedResolves
If the PR resolves an open issue tag it here. For example,
Resolves #34