drgame-cc 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,7 +94,6 @@ export default class GameAnalytics {
94
94
  }
95
95
 
96
96
  public static setUserId(userId: string): void {
97
- this.init();
98
97
  if (!this.initialized) return;
99
98
  try {
100
99
  Reporter.setCommonInfo({ user_id: userId || "" });
@@ -120,7 +119,6 @@ export default class GameAnalytics {
120
119
  action: AnalyticsAction,
121
120
  adRequestId?: string
122
121
  ): void {
123
- this.init();
124
122
  if (!this.initialized) return;
125
123
 
126
124
  const definition = this.definitions[event];
package/drscript/Util.ts CHANGED
@@ -1,10 +1,8 @@
1
- import { pinyin } from "./pinyin/pinyin";
1
+ declare const pinyinPro: any;
2
2
 
3
3
  export class Util {
4
4
  public static getChineseInitials(str: string): string {
5
-
6
-
7
- return pinyin(str, {
5
+ return pinyinPro.pinyin(str, {
8
6
  pattern: 'first',
9
7
  toneType: 'none',
10
8
  type: 'array'
@@ -1,5 +1,9 @@
1
- export function pinyin(word: string, options?: {
1
+ declare const pinyin: (word: string, options?: {
2
2
  pattern?: 'first' | 'final' | 'num' | 'tone' | 'initial';
3
3
  toneType?: 'none' | 'symbol' | 'num';
4
4
  type?: 'array' | 'string' | 'object';
5
- }): string[];
5
+ }) => string | string[] | { zh: string; py: string;[key: string]: any }[];
6
+
7
+ declare const pinyinPro: {
8
+ pinyin: typeof pinyin;
9
+ };