Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stubObject): Update return type to Record<PropertyKey, never> #878

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/ja/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
## インターフェース

```typescript
function stubObject(): {};
function stubObject(): Record<PropertyKey, never>;
```

### 戻り値

(`Object`): 空のオブジェクト。
(`Record<PropertyKey, never>`): 空のオブジェクト。

## 例

Expand Down
4 changes: 2 additions & 2 deletions docs/ko/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
## 인터페이스

```typescript
function stubObject(): {};
function stubObject(): Record<PropertyKey, never>;
```

### 반환 값

(`{}`): 빈 객체.
(`Record<PropertyKey, never>`): 빈 객체.

## 예시

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Returns an empty object.
## Signature

```typescript
function stubObject(): {};
function stubObject(): Record<PropertyKey, never>;
```

### Returns

(`{}`): An empty object.
(`Record<PropertyKey, never>`): An empty object.

## Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/zh_hans/reference/compat/util/stubObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
## 签名

```typescript
function stubObject(): {};
function stubObject(): Record<PropertyKey, never>;
```

### 返回值

(`{}`): 一个空对象。
(`Record<PropertyKey, never>`): 一个空对象。

## 示例

Expand Down
4 changes: 2 additions & 2 deletions src/compat/util/stubObject.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* Returns an empty object.
*
* @returns {Object} An empty object.
* @returns {Record<PropertyKey, never>} An empty object.
* @example
* stubObject() // Returns {}
*/
export function stubObject(): {} {
export function stubObject(): Record<PropertyKey, never> {
return {};
}
Loading