diff --git a/test/src/ts/test.ts b/test/src/ts/test.ts index e194fea0..fc0204d3 100644 --- a/test/src/ts/test.ts +++ b/test/src/ts/test.ts @@ -24,6 +24,17 @@ window.addEventListener("onload", function() { const canvas = document.getElementById("myCanvas"); const gl = canvas.getContext("webgl"); twgl.setDefaults({attribPrefix: "a_"}); + + // just testing that these compile in typescript + twgl.createProgramInfo(gl, ['vs', 'fs'], ['position', 'normals']); + twgl.createProgramInfo(gl, ['vs', 'fs'], ['position', 'normals'], [0, 1]); + twgl.createProgramInfo(gl, ['vs', 'fs'], ['position', 'normals'], [0, 1], (msg: string) => {}); + twgl.createProgramInfo(gl, ['vs', 'fs'], { + errorCallback: (msg: string) => {}, + attribLocations: ['position', 'normals'], + transformFeedbackVaryings: ['colors'], + }); + const programInfo: twgl.ProgramInfo = twgl.createProgramInfo(gl, [ "vs", "fs" // Placeholders ]);