lance icon indicating copy to clipboard operation
lance copied to clipboard

Add missing debug JSDoc annotations to ServerEngine constructor

Open xmclark opened this issue 4 years ago • 0 comments

As a user of this library, I use IDE type hints that leverage the JSDoc type annotations. The ServerEngine constructor takes an options that is missing the debug section. This should be added to the JSDoc annotations.

Sample code:

// Game Instances
const gameEngine = new Game({ traceLevel: Lib.Trace.TRACE_NONE });
const serverEngine = new ServerEngine(io,
    gameEngine,
    {
        debug: {}, // this section
        updateRate: 6
    });

// start the game
serverEngine.start();

Problem description:

Argument type {updateRate: number, debug: {}} is not assignable to parameter type {stepRate: Number, updateRate: Number, fullSyncRate: Number, tracesPath: String, countConnections: Boolean, updateOnObjectCreation: Boolean, timeoutInterval: Number}

xmclark avatar Aug 08 '21 16:08 xmclark