Skip to content

Commit 579d0e3

Browse files
authored
Merge pull request #20947 from Tonvey/dev
TS:Improved cloneable class declaration
2 parents dc6e37b + 069f866 commit 579d0e3

30 files changed

+34
-32
lines changed

src/core/BufferGeometry.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class BufferGeometry extends EventDispatcher {
150150
toNonIndexed(): BufferGeometry;
151151

152152
toJSON(): any;
153-
clone(): this;
153+
clone(): BufferGeometry;
154154
copy( source: BufferGeometry ): this;
155155

156156
/**

src/core/Face3.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class Face3 {
9494
*/
9595
materialIndex: number;
9696

97-
clone(): this;
97+
clone(): Face3;
9898
copy( source: Face3 ): this;
9999

100100
}

src/core/Geometry.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class Geometry extends EventDispatcher {
256256
/**
257257
* Creates a new clone of the Geometry.
258258
*/
259-
clone(): this;
259+
clone(): Geometry;
260260

261261
copy( source: Geometry ): this;
262262

src/core/InstancedBufferGeometry.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export class InstancedBufferGeometry extends BufferGeometry {
1212
*/
1313
type: string;
1414

15+
isInstancedBufferGeometry: boolean;
16+
1517
groups: { start: number; count: number; instances: number }[];
1618

1719
/**

src/core/InterleavedBuffer.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class InterleavedBuffer {
3636
uuid: string;
3737

3838
setUsage( usage: Usage ): InterleavedBuffer;
39-
clone( data: object ): this;
39+
clone( data: object ): InterleavedBuffer;
4040
copy( source: InterleavedBuffer ): this;
4141
copyAt(
4242
index1: number,

src/core/Object3D.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export class Object3D extends EventDispatcher {
379379
images: any;
380380
} ): any;
381381

382-
clone( recursive?: boolean ): this;
382+
clone( recursive?: boolean ): Object3D;
383383

384384
/**
385385
*

src/lights/LightShadow.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class LightShadow {
5757
needsUpdate: boolean;
5858

5959
copy( source: LightShadow ): this;
60-
clone( recursive?: boolean ): this;
60+
clone( recursive?: boolean ): LightShadow;
6161
toJSON(): any;
6262
getFrustum(): number;
6363
updateMatrices( light: Light, viewportIndex?: number ): void;

src/materials/Material.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export class Material extends EventDispatcher {
355355
/**
356356
* Return a new material with the same parameters as this material.
357357
*/
358-
clone(): this;
358+
clone(): Material;
359359

360360
/**
361361
* Copy the parameters from the passed material into this material.

src/math/Box2.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class Box2 {
1919
set( min: Vector2, max: Vector2 ): Box2;
2020
setFromPoints( points: Vector2[] ): Box2;
2121
setFromCenterAndSize( center: Vector2, size: Vector2 ): Box2;
22-
clone(): this;
22+
clone(): Box2;
2323
copy( box: Box2 ): this;
2424
makeEmpty(): Box2;
2525
isEmpty(): boolean;

src/math/Box3.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class Box3 {
2727
setFromPoints( points: Vector3[] ): this;
2828
setFromCenterAndSize( center: Vector3, size: Vector3 ): this;
2929
setFromObject( object: Object3D ): this;
30-
clone(): this;
30+
clone(): Box3;
3131
copy( box: Box3 ): this;
3232
makeEmpty(): this;
3333
isEmpty(): boolean;

0 commit comments

Comments
 (0)