Skip to content

Commit

Permalink
Mark parameters list as readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
sockmaster27 committed Sep 25, 2024
1 parent d4a5f0b commit 8d3fac6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/lib/WebGlFragmentShader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
* However, the `data` property cannot change its type,
* or transition between different types of builtin data.
*
* @type {Parameter[]}
* @type {readonly Parameter[]}
*/
export let parameters = [];
Expand Down Expand Up @@ -341,7 +341,7 @@
}
/**
* @param {Parameter[]} parameters
* @param {readonly Parameter[]} parameters
*/
async function updateParameters(parameters) {
const { gl, shaderProgram } = await configPromise;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/WebGpuFragmentShader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
* However, the `data` property cannot change its type,
* or transition between different types of builtin data.
*
* @type {Parameter[]}
* @type {readonly Parameter[]}
*/
export let parameters = [];
Expand Down Expand Up @@ -398,7 +398,7 @@
}
/**
* @param {Parameter[]} parameters
* @param {readonly Parameter[]} parameters
*/
async function updateParameters(parameters) {
const { device, parameterBuffers } = await configPromise;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const pixelScale =
*
* @template A
* @template B
* @param {A[]} a
* @param {B[]} b
* @param {readonly A[]} a
* @param {readonly B[]} b
* @returns {[A, B][]}
*/
export function zip(a, b) {
Expand Down

0 comments on commit 8d3fac6

Please sign in to comment.