hazzard993 / love-typescript-definitions

Write LÖVE 2D projects with TypeScript
MIT License
116 stars 11 forks source link

Adds extention and default value for shader functions #68

Closed xharris closed 2 years ago

xharris commented 2 years ago

I was seeing this error when compiling with tstl.

[{
    "resource": "****/node_modules/love-typescript-definitions/typings/love.graphics/functions.d.ts",
    "owner": "typescript",
    "code": "2344",
    "severity": 8,
    "message": "Type 'T' does not satisfy the constraint '{ [key: string]: any; } | undefined'.\n  Type 'T' is not assignable to type '{ [key: string]: any; }'.",
    "source": "ts",
    "startLineNumber": 1310,
    "startColumn": 61,
    "endLineNumber": 1310,
    "endColumn": 62,
    "relatedInformation": [
        {
            "startLineNumber": 1310,
            "startColumn": 24,
            "endLineNumber": 1310,
            "endColumn": 37,
            "message": "This type parameter might need an `extends { [key: string]: any; }` constraint.",
            "resource": "****/node_modules/love-typescript-definitions/typings/love.graphics/functions.d.ts"
        },
        {
            "startLineNumber": 1310,
            "startColumn": 24,
            "endLineNumber": 1310,
            "endColumn": 37,
            "message": "This type parameter might need an `extends { [key: string]: any; } | undefined` constraint.",
            "resource": "****/node_modules/love-typescript-definitions/typings/love.graphics/functions.d.ts"
        }
    ]
}]

My changes seem to fix this error.

xharris commented 2 years ago

All done. Thanks for reviewing!

hazzard993 commented 2 years ago

Excellent! Your changes should now be available in love-typescript-definitions@0.24.3