flyover / box2d.ts

A TypeScript port of Box2D
https://flyover.github.io/box2d.ts/testbed
MIT License
405 stars 85 forks source link

Source code can't be compiled. #43

Closed jcyuan closed 5 years ago

jcyuan commented 5 years ago

image

function default_compare<T>(a: T, b: T): boolean { return a < b; }

the error is

[ts] cant assign “(a: A, b: B) => boolean” to “(a: T, b: T) => boolean” arg “b” is not compatible with “b” cant assign “B” to type “A”

jcyuan commented 5 years ago

ts version 3.1.1

flyover commented 5 years ago

a8fab993e18a2b4ff5e547e0da5928a2fbd521ff