Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
Signed-off-by: BugDiver <[email protected]>
  • Loading branch information
BugDiver committed Jun 17, 2024
1 parent 3886c40 commit ffd91c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions gauge-ts/src/loaders/ImplLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ type ModuleType = {
};

export class ImplLoader {
private parameterParsignChain: ParameterParsingChain;
private parameterParsingChain: ParameterParsingChain;

constructor(parameterParsignChain: ParameterParsingChain) {
this.parameterParsignChain = parameterParsignChain;
constructor(parameterParsingChain: ParameterParsingChain) {
this.parameterParsingChain = parameterParsingChain;
}

public async loadImplementations(): Promise<void> {
Expand All @@ -27,7 +27,7 @@ export class ImplLoader {
if (c.default && c.default.length === 0) {
const instance = new c.default();
if (Util.isCustomParameterParser(instance)) {
this.parameterParsignChain.addCustomParser(
this.parameterParsingChain.addCustomParser(
instance as ParameterParser,
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion gauge-ts/src/processors/params/ParameterParser.ts
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit ffd91c0

Please sign in to comment.