Skip to content

Commit

Permalink
V2.0.7;RestTypeNode
Browse files Browse the repository at this point in the history
  • Loading branch information
shrinktofit committed Oct 29, 2020
1 parent dc5d8c3 commit 999d97a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tfig",
"version": "2.0.6",
"version": "2.0.7",
"description": "Yet another tool to generate .d.ts bundle.",
"main": "build/gift.js",
"types": "build/gift.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions source/recast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,8 @@ export function recastTopLevelModule({
return ts.createInferTypeNode(
recastTypeParameter(type.typeParameter),
);
} else if (type.kind === ts.SyntaxKind.RestType) {
return ts.createRestTypeNode(recastTypeNode((type as ts.RestTypeNode).type));
} else {
console.warn(`Don't know how to handle type ${type.getText()}(${tsUtils.stringifyNode(type)})`);
}
Expand Down
1 change: 1 addition & 0 deletions test/declarations-output/cc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28269,6 +28269,7 @@ declare module "cc" {
}
}
import { requireComponent, executionOrder, disallowMultiple, executeInEditMode, menu, playOnFocus, inspector, icon, help, type, integer, float, boolean, string } from "cc.decorator";
export { ModelComponent as MeshRenderer } from "cc";
import { PrimitiveType as _PrimitiveType, EAxisDirection as _EAxisDirection, ERigidBodyType as _ERigidBodyType } from "cc";
}
declare module "cc.decorator" {
Expand Down
6 changes: 4 additions & 2 deletions test/declarations/cc-before-rollup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18153,12 +18153,12 @@ declare module "cocos/core/3d/framework/index" {
import { CameraComponent } from "cocos/core/3d/framework/camera-component";
import { DirectionalLightComponent } from "cocos/core/3d/framework/directional-light-component";
import { LightComponent } from "cocos/core/3d/framework/light-component";
import { ModelComponent } from "cocos/core/3d/framework/model-component";
import { ModelComponent, MeshRenderer } from "cocos/core/3d/framework/model-component";
import { RenderableComponent } from "cocos/core/3d/framework/renderable-component";
import { SkinningModelComponent } from "cocos/core/3d/framework/skinning-model-component";
import { SphereLightComponent } from "cocos/core/3d/framework/sphere-light-component";
import { SpotLightComponent } from "cocos/core/3d/framework/spot-light-component";
export { CameraComponent, LightComponent, ModelComponent, SkinningModelComponent, BatchedSkinningModelComponent, SkinningModelUnit, RenderableComponent, DirectionalLightComponent, SphereLightComponent, SpotLightComponent, };
export { CameraComponent, LightComponent, ModelComponent, MeshRenderer, SkinningModelComponent, BatchedSkinningModelComponent, SkinningModelUnit, RenderableComponent, DirectionalLightComponent, SphereLightComponent, SpotLightComponent, };
/** deprecated */
import "cocos/core/3d/framework/deprecated";
}
Expand Down Expand Up @@ -28874,6 +28874,8 @@ declare module "cocos/core/3d/framework/model-component" {
type ShadowCastingMode = EnumAlias<typeof ModelShadowCastingMode>;
type ShadowReceivingMode = EnumAlias<typeof ModelShadowReceivingMode>;
}

export { ModelComponent as MeshRenderer };
}
declare module "cocos/core/utils/batch-utils" {
import { Node } from "cocos/core/scene-graph/node";
Expand Down

0 comments on commit 999d97a

Please sign in to comment.