Fix TypeScript typing for filterColor shader hook by Kathrina-dev · Pull Request #8644 · processing/p5.js
Hi! If you run npm run test:types, it gets a number of errors, e.g.:
Error: types/global.d.ts(1387,21): error TS2749: 'CENTER' refers to a value, but is being used as a type here. Did you mean 'typeof CENTER'?
Error: types/global.d.ts(1387,30): error TS2749: 'RADIUS' refers to a value, but is being used as a type here. Did you mean 'typeof RADIUS'?
Error: types/global.d.ts(1387,39): error TS2749: 'CORNER' refers to a value, but is being used as a type here. Did you mean 'typeof CORNER'?
Error: types/global.d.ts(1387,48): error TS2749: 'CORNERS' refers to a value, but is being used as a type here. Did you mean 'typeof CORNERS'?
Error: types/global.d.ts(1574,36): error TS2749: 'FALLBACK' refers to a value, but is being used as a type here. Did you mean 'typeof FALLBACK'?
Error: types/global.d.ts(1574,47): error TS2749: 'LABEL' refers to a value, but is being used as a type here. Did you mean 'typeof LABEL'?
Error: types/global.d.ts(1636,60): error TS2749: 'P2D' refers to a value, but is being used as a type here. Did you mean 'typeof P2D'?
Error: types/global.d.ts(1636,66): error TS2749: 'WEBGL' refers to a value, but is being used as a type here. Did you mean 'typeof WEBGL'?
Error: types/global.d.ts(1636,74): error TS2749: 'P2DHDR' refers to a value, but is being used as a type here. Did you mean 'typeof P2DHDR'?
Error: types/global.d.ts(1670,24): error TS2749: 'FALLBACK' refers to a value, but is being used as a type here. Did you mean 'typeof FALLBACK'?
Error: types/global.d.ts(1670,35): error TS2749: 'LABEL' refers to a value, but is being used as a type here. Did you mean 'typeof LABEL'?
Error: types/global.d.ts(1704,136): error TS2749: 'BLEND' refers to a value, but is being used as a type here. Did you mean 'typeof BLEND'?
Error: types/global.d.ts(1704,144): error TS2749: 'DARKEST' refers to a value, but is being used as a type here. Did you mean 'typeof DARKEST'?
Error: types/global.d.ts(1704,154): error TS2749: 'LIGHTEST' refers to a value, but is being used as a type here. Did you mean 'typeof LIGHTEST'?
Error: types/global.d.ts(1704,165): error TS2749: 'DIFFERENCE' refers to a value, but is being used as a type here. Did you mean 'typeof DIFFERENCE'?
Error: types/global.d.ts(1704,178): error TS2749: 'MULTIPLY' refers to a value, but is being used as a type here. Did you mean 'typeof MULTIPLY'?
Error: types/global.d.ts(1704,189): error TS2749: 'EXCLUSION' refers to a value, but is being used as a type here. Did you mean 'typeof EXCLUSION'?
Looks like the way the existing typedefs are being exported has changed -- the typedef itself should be a type, but also there should be a const of the same name from the rest of the jsdoc.