diff --git a/packages/typegpu/src/index.ts b/packages/typegpu/src/index.ts index f3a62c94a..da8adf18c 100644 --- a/packages/typegpu/src/index.ts +++ b/packages/typegpu/src/index.ts @@ -144,7 +144,12 @@ export type { RenderFlag, SampledFlag } from './core/texture/usageExtension.ts'; export type { InitFromDeviceOptions, InitOptions } from './core/root/init.ts'; export type { TgpuConst } from './core/constant/tgpuConstant.ts'; export type { TgpuVar, VariableScope } from './core/variable/tgpuVariable.ts'; -export type { TgpuSampler } from './core/sampler/sampler.ts'; +export type { + TgpuComparisonSampler, + TgpuFixedComparisonSampler, + TgpuFixedSampler, + TgpuSampler, +} from './core/sampler/sampler.ts'; export type { TgpuQuerySet } from './core/querySet/querySet.ts'; export type { BindLayoutEntry, diff --git a/packages/typegpu/tests/texture.test.ts b/packages/typegpu/tests/texture.test.ts index e40552a73..c51f1a1e6 100644 --- a/packages/typegpu/tests/texture.test.ts +++ b/packages/typegpu/tests/texture.test.ts @@ -7,7 +7,7 @@ import type { RenderFlag, SampledFlag, } from '../src/core/texture/usageExtension.ts'; -import tgpu from '../src/index.ts'; +import tgpu, { type TgpuRoot } from '../src/index.ts'; import { StrictNameRegistry } from '../src/nameRegistry.ts'; import { it } from './utils/extendedIt.ts'; import * as d from '../src/data/index.ts'; @@ -695,4 +695,21 @@ Overload 2 of 2, '(schema: "(Error) Storage texture format 'rgba8snorm' incompat }); }); }); + + describe('non-parametrized TgpuTexture type', () => { + it('accepts any texture', () => { + const createTexture = ( + root: TgpuRoot, + size: { width: number; height: number }, + ): TgpuTexture => { + const texture = root['~unstable'].createTexture({ + size: [size.width, size.height], + format: 'rgba8unorm', + }); + + // TODO: Fix this error + return texture; + }; + }); + }); });