From 59041aae7e5e99aeccfcf71749ac51b4c65b572b Mon Sep 17 00:00:00 2001 From: Yongseok Kang Date: Tue, 27 Dec 2022 16:57:05 +0900 Subject: [PATCH] [#117] make Agent d.ts in repository --- index.d.ts | 22 ++++++++++++++++++++++ lib/agent.js | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 00000000..68b1e887 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,22 @@ +declare namespace Pinpoint { + export interface Agent { + start(initOptions: any); + initializeDataSender(): void; + initializeSupportModules(): void; + initializePinpointClient(): void; + createTraceObject(requestData: any): Trace; + currentTraceObject(): any; + completeTraceObject(trace: any): void; + createAgentInfo(config: any, agentStartTime: any): AgentInfo; + startSchedule(agentId: any, agentStartTime: any): void; + spanEndCallbackWrapper(trace: any, spanEventRecorder: any, original: any): any; + } + + export interface Trace { + } + + export interface AgentInfo { + } +} +declare const pinpointAgent: Pinpoint.Agent; +export = pinpointAgent; \ No newline at end of file diff --git a/lib/agent.js b/lib/agent.js index 0a04f635..b4beae91 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -48,7 +48,7 @@ class Agent { apiMetaService.init(this.dataSender) this.startSchedule(agentId, agentStartTime) - this.initailizeSupportModules() + this.initializeSupportModules() log.warn('[Pinpoint Agent][' + agentId + '] Init Completed') } @@ -58,7 +58,7 @@ class Agent { this.dataSender.send(this.agentInfo) } - initailizeSupportModules() { + initializeSupportModules() { this.moduleHook = new ModuleHook(this) }