hegel icon indicating copy to clipboard operation
hegel copied to clipboard

An advanced static type checker

Results 108 hegel issues
Sort by recently updated
recently updated
newest added

To allow for type refinement to be abstracted into functions: ```ts function isNumber(n: unknown): n is number { if (typeof n === 'number' && !isNaN(n)) return true return false }...

enhancement

Consider the following function: ```js let f = (a, b) => a + b ``` The inferred type is ``` (T, T) => T ``` This might seem correct, but...

bug
invalid
question

IMHO, this should typecheck ``` type T = K type ApplyNumber = T const x : ApplyNumber = 3 ```

duplicate

ok so i was planning to try and use hegel in real project to see what is missing and what's not. so i decided to first extract my project setup...

enhancement

Hey, I'm not sure if this kind of things is outside of the scope of the language (is it "_only_" supposed to add types to JS, or is it an...

question

I had a look at the documentation and the cli interface, but I couldn't find anything that looked like it output type inferences. Is there a way to get hegel...

question

I tried the playground, but had the following error in chrome. Mixed Content: The page at 'https://hegel.js.org/try#MYGwhgzhAEAiYBcwCFIFNoG8BQ1oCc1gB7AO1KIQAoBKLAtBAV31OgQAsBLCAbgHoAVNAB0YhiXKVoIYgHMuwaIP4BfbOtCQYAMS4APZoSy4JZCsGp1M7bhBEATfMQAO8JACN0tXgyNtOHgFhMREzKUsZeUVlNVMnV3cwLwg0Wix1dWwAMyZSSy4yaFTmFwBRACYyqgcPAC44RBR0a3iPEUJJCyteDWxsfn5oAEFSB2gAT2IWdjQwAFtEDGzifDliBHZiaGAOMFI5DAhiecZuA+gwbIQ0fGgHNA8mOQUD7EkITdroAF5oCgA7tA9IYWGkaL0Hk8XrdeoMRmNJtNoHsAG4YYYAeQAKtBbs47lw2FMZmgHFwEKtoFSifcWIhCmxiNloC5nAAraQkeYuLjgBCM7AlJjlKo1DwQ7BAA' was loaded over HTTPS, but requested an insecure resource 'http://hegel.js.org/try/#MYGwhgzhAEAiYBcwCFIFNoG8BQ1oCc1gB7AO1KIQAoBKLAtBAV31OgQAsBLCAbgHoAVNAB0YhiXKVoIYgHMuwaIP4BfbOtCQYAMS4APZoSy4JZCsGp1M7bhBEATfMQAO8JACN0tXgyNtOHgFhMREzKUsZeUVlNVMnV3cwLwg0Wix1dWwAMyZSSy4yaFTmFwBRACYyqgcPAC44RBR0a3iPEUJJCyteDWxsfn5oAEFSB2gAT2IWdjQwAFtEDGzifDliBHZiaGAOMFI5DAhiecZuA+gwbIQ0fGgHNA8mOQUD7EkITdroAF5oCgA7tA9IYWGkaL0Hk8XrdeoMRmNJtNoHsAG4YYYAeQAKtBbs47lw2FMZmgHFwEKtoFSifcWIhCmxiNloC5nAAraQkeYuLjgBCM7AlJjlKo1DwQ7BAA'. This request has...

help wanted
invalid

¿How I can define and implement an overloaded function with different result type? Example: ```ts function generate(type: 'number' | 'string') { if (type === 'number') { return 1234 } else...

enhancement

> tidr: for lazy type refinement we need a parameterized unknown A problem: we can't define a _expected_ type for future refinement: ```ts const data: Array | unknown = JSON.parse(some)...

enhancement
question

I tried this on the playground but it fails (`Analyzation: SpreadElement`) Curry is very hard to type correctly, this would be the ultimate test for your project: ```ts const curry...

question