TimelordUK / jspurefix

native typescript FIX engine
MIT License
61 stars 28 forks source link

JSPureFix ASessionMsgFactory Types Patch #85

Open ambrosestartup opened 8 months ago

ambrosestartup commented 8 months ago

Hi, I was deploying using jspurefix and I had some strict type errs stemming from string | undefined -> string. I had to implement an override, thought this might be helpful for users failing on build as I was:

declare module "jspurefix/dist/transport/session/a-session-msg-factory" { import { ISessionMsgFactory } from "jspurefix"; import { ILooseObject } from "jspurefix/dist/collections/collection"; import { IStandardHeader } from "jspurefix/dist/types/FIX4.4/repo";

export interface ASessionMsgFactory extends ISessionMsgFactory {
  logon(userRequestId?: string, isResponse?: boolean): ILooseObject;
  header(msgType?: string, seqNum?: number, time?: Date, overrideData?: Partial<IStandardHeader>): ILooseObject;
}

}