TONG-H

2025-03

1541Daily Snippets2025-03-012025-04-02

2025/03/23

2025/03/16

2025/03/08

  • incorrect merge two union types using & results in never.

  • merging types with conflicting property results in never, whereas merging such conflicts in an interface triggers a compile-time error.”

    1
    2
    3
    type A = { id: string };
    type B = { id: number };
    type C = A & B; // { id: never }
  • changes in dates during rebase. git tracks two date timestamps Author Date and Committer Date. git rebase can modifies commit history, which affects committerDate. the default behavior preserves authorDate, and updates committerDate to the rebase time

    • authorDate (Creation Date) – When the commit was created.
    • committerDate (Last Modified Date) – When the commit was last modified.
    • git rebase --ignore-date ensures both authorDate and committerDate remain unchanged
  • TS的enum编译为IIFE(立即执行函数)