Skip to content

Commit 186cd72

Browse files
committed
chore: update version to 1.0.1 in package.json; add TypeScript declaration to README.md
1 parent 0100ce4 commit 186cd72

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ createInertiaApp({
133133
});
134134
```
135135

136+
**TypeScript Declaration**
137+
138+
To ensure type safety when accessing `window.localizer`, add this global declaration to your project:
139+
140+
```typescript
141+
declare global {
142+
interface Window {
143+
localizer: {
144+
translations: typeof translations;
145+
};
146+
}
147+
}
148+
```
149+
136150
**Alternative: Create a separate file**
137151

138152
**File: `resources/js/lang/index.ts`**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devwizard/laravel-localizer-react",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"type": "module",
55
"description": "React integration for Laravel Localizer with Vite plugin, useLocalizer hook, and automatic TypeScript generation",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)