diff --git a/docs/index.md b/docs/index.md index 94f0e30..8b488d4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -313,7 +313,7 @@ String elementId = scenarioStore.get("element-id") as string; * By default gauge-ts tries to convert the spec parameter to primitives (number, boolean), for table parameters gauge-ts will convert parameters to `Table` type. gauge-ts also provide a way to customize the parameter parsing. -If you need to have custom paramters in your step implementations create a parameter parser which should implements methods from `ParameterParser` interface. +If you need to have custom parameters in your step implementations create a parameter parser which should implements methods from `ParameterParser` interface. Step definition: ```md @@ -354,8 +354,8 @@ import { Parameter, ParameterParser } from 'gauge-ts'; import { Person } from '@lib/Person'; export default class PersonParameterParser implements ParameterParser { - public canParse(paramter: Parameter): boolean { - return paramter.getValue().startsWith("{") && paramter.getValue().endsWith("}"); + public canParse(parameter: Parameter): boolean { + return parameter.getValue().startsWith("{") && parameter.getValue().endsWith("}"); } public parse(parameter: Parameter): Object { diff --git a/gauge-ts/src/processors/params/ParameterParser.ts b/gauge-ts/src/processors/params/ParameterParser.ts index 83e3484..db0e8af 100644 --- a/gauge-ts/src/processors/params/ParameterParser.ts +++ b/gauge-ts/src/processors/params/ParameterParser.ts @@ -1,6 +1,6 @@ import type { Parameter } from "../../gen/spec_pb"; export interface ParameterParser { - canParse(paramter: Parameter): boolean; + canParse(parameter: Parameter): boolean; parse(parameter: Parameter): unknown; }