Skip to content

Commit

Permalink
Merge pull request #35 from Ashish-simpleCoder/feature/develop-hooks
Browse files Browse the repository at this point in the history
Fix missing utility type Prettify in build
  • Loading branch information
Ashish-simpleCoder authored May 7, 2024
2 parents efdd10d + b21e739 commit e7715a0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-rules-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

Fix missing utility type Prettify in build
12 changes: 6 additions & 6 deletions apps/doc/hooks/use-event-listener.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ outline: deep

### Parameters

| Parameter | Type | Required | Default Value | Description |
| ----------------- | :-----------------------: | :------: | :-----------: | --------------------------------------------------- |
| target | [Target](#parametertype) || - | Reference of the html element |
| event | string || - | Event name |
| handler | [Handler](#parametertype) || undefined | Callback for the event |
| options | [Options](#parametertype) || undefined | For managing Event Propagation |
| Parameter | Type | Required | Default Value | Description |
| --------- | :-----------------------: | :------: | :-----------: | ------------------------------ |
| target | [Target](#parametertype) || - | Reference of the html element |
| event | string || - | Event name |
| handler | [Handler](#parametertype) || undefined | Callback for the event |
| options | [Options](#parametertype) || undefined | For managing Event Propagation |

### Returns

Expand Down
8 changes: 4 additions & 4 deletions apps/doc/hooks/use-outside-click.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ outline: deep

### Parameters

| Parameter | Type | Required | Default Value | Description |
| ----------------- | :-----------------------: | :------: | :-----------: | --------------------------------------------------- |
| target | [Target](#parametertype) || - | Reference of the html element |
| handler | [Handler](#parametertype) || undefined | Callback for the event |
| Parameter | Type | Required | Default Value | Description |
| --------- | :-----------------------: | :------: | :-----------: | ----------------------------- |
| target | [Target](#parametertype) || - | Reference of the html element |
| handler | [Handler](#parametertype) || undefined | Callback for the event |

### Types

Expand Down
1 change: 1 addition & 0 deletions src/lib/use-counter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client'
import type { Prettify } from '../../types'
import React, { useCallback, useState } from 'react'
import { capitalizeFirstLetter } from '../../utils/capitalize-first-letter'

Expand Down
1 change: 1 addition & 0 deletions src/lib/use-event-listener/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client'
import type { Prettify } from '../../types'
import React, { RefObject, useEffect } from 'react'
import useSyncedRef from '../use-synced-ref'

Expand Down
2 changes: 1 addition & 1 deletion src/types/index.d.ts → src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
type Prettify<K> = {
export type Prettify<K> = {
[Key in keyof K]: K[Key]
} & {}
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
clean: true,
all: true,
include: ['src/lib/**/*'],
exclude: ['src/lib/use-combined-key-event-listener'],
},
include: ['src/lib/**/*.{test,spec}.{js,jsx,ts,tsx}'],
exclude: [
Expand Down

0 comments on commit e7715a0

Please sign in to comment.