iamkun / iamkun/dayjs

Export `dayjs.Dayjs` in source to keep the same as type definition

Open
#2,647 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Currently there is a `Dayjs` class definition in declaration file locates on `dayjs.Dayjs`. But in source there is no a `Dayjs` property of `dayjs`. It's confusing that TS tells developers they can access `dayjs.Dayjs` but actually they can't.

**Expected behavior**

Also export `Dayjs` in source.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the source export entry point and comparing it with the declaration file that exposes dayjs.Dayjs. Confirm the existing package checks for exports, then verify that the runtime dayjs.Dayjs property is available and matches the type definition.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.