Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Compare feature#1511

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
snatvb wants to merge13 commits intosamchon:master
base:master
Choose a base branch
Loading
fromsnatvb:compare
Draft

Compare feature#1511

snatvb wants to merge13 commits intosamchon:masterfromsnatvb:compare

Conversation

@snatvb
Copy link

@snatvbsnatvb commentedFeb 24, 2025
edited
Loading

Feature of#1497

Classes

Added "class" property to detect that object is class

Classes forbidden to compare because there is a lot of deep cases that might leads to bug with prototypes.

Extends MetadataCollection

Added find method of type for objects. I think it's good idea to have possibility to getts.Type by anyMetadata.

It requires in my case, because metadata doesn't cover this methods declarations:

typeFoo{bar():void}

I've noticed that it's hard to compare unions:

typeFoo={foo:number}typeBar={bar?:number}typeUnion=Foo|Barconsta={foo:1}constb={foo:2}console.assert(a===b||(a.foo===b.foo)||(a.bar===b.bar))

This will be true, because after fail onfoo prop,a.bar === b.bar becauseundefined === undefined

And this unions a lot of corner cases. I just forbidden it. Left only for primitive types.

Development & Test Environment

I've faced with problem that tests take too much time. I've added possibility to add flag that will filter tests by folder.

pnpm dev --folder=compare.equals

Also added watch mode for root:

pnpm dev

@pkg-pr-new
Copy link

Open in Stackblitz

npm i https://pkg.pr.new/typia@1511

commit:969f1ed

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@snatvb

[8]ページ先頭

©2009-2025 Movatter.jp