KiaraGrouwstra / typical

playground for type-level primitives in TypeScript
MIT License
173 stars 5 forks source link

Install from npm #6

Closed goodmind closed 6 years ago

goodmind commented 7 years ago

Is this possible to install this package as dependency? Maybe you can provide "typings" field in package.json?

KiaraGrouwstra commented 7 years ago

If I can help by adding fields, that's fine (PRs welcome too), but I thought the typings field was relevant only to point to .d.ts files? At the tsconfig json schema I only still see a types array, weird. Also see #5.

goodmind commented 7 years ago

You can look how typelevel-ts do this

KiaraGrouwstra commented 7 years ago

Okay, done. :)

goodmind commented 7 years ago

Thanks

goodmind commented 6 years ago

@tycho01 can you update lib on npm? are you forgot to upload it?

KiaraGrouwstra commented 6 years ago

Sorry, published now but still seeing an npm build error ("Maximum call stack size exceeded"). I should look into that for a bit...

KiaraGrouwstra commented 6 years ago

Oh, seems that had to do with the TS version I'd tried (local master). Still some version-sensitive things going on though.

goodmind commented 6 years ago

@tycho01 looks like this can't be published

goodmind commented 6 years ago

image

KiaraGrouwstra commented 6 years ago

Thanks. The issue seemed to be with the files in package.json. Fixing that got the other files in, see here.

goodmind commented 6 years ago

@tycho01 why lib in package.json then?

KiaraGrouwstra commented 6 years ago

You'd suggest using src for main and typings right? If that works better I'm open to that.

goodmind commented 6 years ago

@tycho01 you don't have lib in npm 😁

KiaraGrouwstra commented 6 years ago

Fair enough, I should add that. Running into some non-terminating type again though, so having issues compiling without an easy way to pinpoint the culprit. Experimental type libs still have their quirks, ugh. :/

goodmind commented 6 years ago

Can't run npm run build tsc hangs

KiaraGrouwstra commented 6 years ago

Yeah, same; seems there are still types that won't terminate. Thought I'd already found and commented them before, but guess it could change depending on the TS version too. Definitely the most annoying part about TS type libs, as finding the problem is basically binary search commenting/uncommenting types until found, and as soon as a different TS version gives another one you're back at square one, ugh.

ccorcos commented 6 years ago

I'm getting into an infinite loop as well -- cant install this package :(

KiaraGrouwstra commented 6 years ago

I just realized tsc hangs while the tsst test compilations don't. Nailing down which bits would take some searching though, while I can't really commit much atm.

KiaraGrouwstra commented 6 years ago

progress: I tried figuring out what was causing the overflow (it's weird but I somehow suppressed it for the moment), then added (and committed) a tsc log tackle things bit by bit.

KiaraGrouwstra commented 6 years ago

I'll further track this in #18. I refactored to separate files and tracked the timeouts now. Making this usable for consumption should mean tackling the tsc log, which currently looks pretty bad -- that's what I get for not having had good ways to deal with these issues until recently. Uncommenting a bad type or updating TS by a day means everything breaks again. This still feels like a mine field. On the bright side, docs do work for once.