Skip to content

Commit

Permalink
add missing export types to gl/* (#11471)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored Feb 4, 2022
1 parent 7400f93 commit 3c3fe28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/gl/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ class Context {
this.pixelStoreUnpackFlipY.dirty = true;
}

createIndexBuffer(array: TriangleIndexArray | LineIndexArray | LineStripIndexArray, dynamicDraw?: boolean) {
createIndexBuffer(array: TriangleIndexArray | LineIndexArray | LineStripIndexArray, dynamicDraw?: boolean): IndexBuffer {
return new IndexBuffer(this, array, dynamicDraw);
}

createVertexBuffer(array: StructArray, attributes: $ReadOnlyArray<StructArrayMember>, dynamicDraw?: boolean) {
createVertexBuffer(array: StructArray, attributes: $ReadOnlyArray<StructArrayMember>, dynamicDraw?: boolean): VertexBuffer {
return new VertexBuffer(this, array, attributes, dynamicDraw);
}

createRenderbuffer(storageFormat: number, width: number, height: number) {
createRenderbuffer(storageFormat: number, width: number, height: number): ?WebGLRenderbuffer {
const gl = this.gl;

const rbo = gl.createRenderbuffer();
Expand All @@ -210,7 +210,7 @@ class Context {
return rbo;
}

createFramebuffer(width: number, height: number, hasDepth: boolean) {
createFramebuffer(width: number, height: number, hasDepth: boolean): Framebuffer {
return new Framebuffer(this, width, height, hasDepth);
}

Expand Down
2 changes: 1 addition & 1 deletion src/gl/value.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ class FramebufferAttachment<T> extends BaseValue<?T> {
this.context = context;
this.parent = parent;
}
getDefault() {
getDefault(): null {
return null;
}
}
Expand Down

0 comments on commit 3c3fe28

Please sign in to comment.