Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize type for 2.4.10 #11981

Merged
merged 3 commits into from
Jul 18, 2022
Merged

optimize type for 2.4.10 #11981

merged 3 commits into from
Jul 18, 2022

Conversation

PPpro
Copy link
Contributor

@PPpro PPpro commented Jul 14, 2022

Re: #11731

related pr: cocos-creator/creator-api-docs-2.x#204

changeLog:

  • remove duplicated constant declaration: CC_JSB, CC_EDITOR, CC_PREVIEW, CC_TEST, CC_DEBUG
  • optimize interface declaration
class DynamicAtlasManager  {
-  insertSpriteFrame (spriteFrame: SpriteFrame): void;
+  insertSpriteFrame (spriteFrame: SpriteFrame): Object;  // should be an interface in ts
}

class TiledMap {
-  enableCulling(value: any);
+  enableCulling(value: boolean);
}

class TiledLayer{
-  enableCulling(value: any);
+  enableCulling(value: boolean);
}

class CacheManager  {
-  removeCache(): void;
+  removeCache(originUrl: string): void
}

@PPpro PPpro changed the title optimize constants in api.d.ts for 2.4.10 optimize type for 2.4.10 Jul 14, 2022
@PPpro PPpro requested a review from SantyWang July 14, 2022 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants