Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tyn1998 committed Jul 30, 2022
1 parent fbb85c4 commit 3f7a04d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/connection/src/common/proxy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ApplicationError } from '@opensumi/ide-core-common';
import type { MessageConnection } from '@opensumi/vscode-jsonrpc/lib/common/connection';

import { getCapturer, genrateUniqueId } from './utils';
import { getCapturer, generateUniqueId } from './utils';

export abstract class RPCService<T = any> {
rpcClient?: T[];
Expand Down Expand Up @@ -120,7 +120,7 @@ export class RPCProxy {
} else {
let requestResult: Promise<any>;
// generate a unique requestId to associate request and requestResult
const requestId = genrateUniqueId();
const requestId = generateUniqueId();

if (isSingleArray) {
requestResult = connection.sendRequest(prop, [...args]) as Promise<any>;
Expand Down
2 changes: 1 addition & 1 deletion packages/connection/src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export function getCapturer() {
return;
}

export function genrateUniqueId() {
export function generateUniqueId() {
return Date.now().toString(36) + Math.random().toString(36).substr(2);
}

0 comments on commit 3f7a04d

Please sign in to comment.