Skip to content

Commit

Permalink
Merge pull request #20133 from Berthur/objects-ts-generics
Browse files Browse the repository at this point in the history
Extend object classes in TypeScript with generic types
  • Loading branch information
mrdoob authored Aug 20, 2020
2 parents 9f29ef4 + c960bb1 commit c631aff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/objects/InstancedMesh.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Matrix4 } from './../math/Matrix4';
export class InstancedMesh <
TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry,
TMaterial extends Material | Material[] = Material | Material[]
> extends Mesh {
> extends Mesh<TGeometry, TMaterial> {

constructor(
geometry: TGeometry,
Expand Down
2 changes: 1 addition & 1 deletion src/objects/LineLoop.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BufferGeometry } from '../core/BufferGeometry';
export class LineLoop <
TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry,
TMaterial extends Material | Material[] = Material | Material[]
> extends Line {
> extends Line<TGeometry, TMaterial> {

constructor(
geometry?: TGeometry,
Expand Down
2 changes: 1 addition & 1 deletion src/objects/LineSegments.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const LinePieces: number;
export class LineSegments <
TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry,
TMaterial extends Material | Material[] = Material | Material[]
> extends Line {
> extends Line<TGeometry, TMaterial> {

constructor(
geometry?: TGeometry,
Expand Down
2 changes: 1 addition & 1 deletion src/objects/SkinnedMesh.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BufferGeometry } from '../core/BufferGeometry';
export class SkinnedMesh <
TGeometry extends Geometry | BufferGeometry = Geometry | BufferGeometry,
TMaterial extends Material | Material[] = Material | Material[]
> extends Mesh {
> extends Mesh<TGeometry, TMaterial> {

constructor(
geometry?: TGeometry,
Expand Down

0 comments on commit c631aff

Please sign in to comment.