Sʜɪᴍᴜʀᴀ Yū

Results 136 comments of Sʜɪᴍᴜʀᴀ Yū

I'm very sorry for being unresponsible for a long time. Now I've got some time to work here.

Thanks for resuming this point. I'd go for this way https://github.com/pelotom/runtypes/pull/159#issuecomment-812815234: ```ts check(x: B): A extends B ? A : never; ``` But this only allows calling with inputs of...

Another thing to notate is, the type of `definitelyNotAMyRecord` in your example is `{ qux: boolean; }` that may be compatible with `MyRecord` which is `{ foo: string; bar: number;...

We're sorry for being inactive for a long time; #296 should solve this.

Currently we have no option for this AFAIK (I can't believe this hasn't been an issue until 2021 🤣) We need something like this, absolutely! Thanks for pointing out. One...

No, as noticed in https://github.com/microsoft/TypeScript/issues/7765#issuecomment-291947728, that won't work too. Also see https://github.com/microsoft/TypeScript/issues/7765#issuecomment-568218336, you can define a type without error by intersecting, but it can't be used properly. This seems to...

Hmm, unfortunately it seems pretty hard to work with symbols and rest properties in current versions of TS... - https://github.com/microsoft/TypeScript/issues/7765 - https://github.com/microsoft/TypeScript/issues/17867 - https://github.com/microsoft/TypeScript/issues/37469 - https://github.com/microsoft/TypeScript/pull/26797, which is [coming in...

Sorry for being late, let's track this at #236!

`Record` runtype has `fields` property which contains the original information of passed schema, and every runtype has `tag` property, for example: `Record(...).tag === 'record'`. Doesn't it fit your needs?

`Optional` has `underlying`, `Union` has `alternatives`, `Intersect` has `intersectees` etc., though these must be documented as well. Also maybe #217 could help that. BTW I think it's a reasonable idea...