Skip to content

Commit

Permalink
chore: remove some any types (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
asashour committed Apr 21, 2024
1 parent 7f4999b commit 28683b3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions features/step_definitions/usage_json_steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { IUsage } from '../../src/formatter/helpers/usage_helpers'

Then('it outputs the usage data:', function (this: World, table: DataTable) {
const usageData: IUsage[] = JSON.parse(this.lastRun.output)
table.hashes().forEach((row: any) => {
table.hashes().forEach((row) => {
const rowUsage = usageData.find(
(datum) =>
datum.pattern === row.PATTERN && datum.patternType === row.PATTERN_TYPE
)
expect(rowUsage).to.be.an('object')
expect(rowUsage.line).to.eql(parseInt(row.LINE))
expect(rowUsage.matches).to.have.lengthOf(row['NUMBER OF MATCHES'])
expect(rowUsage.matches).to.have.lengthOf(Number(row['NUMBER OF MATCHES']))
expect(rowUsage.uri).to.eql(path.normalize(row.URI))
})
})
2 changes: 1 addition & 1 deletion features/support/formatter_output_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function normalizeMessageOutput(
export function stripMetaMessages(
envelopeObjects: messages.Envelope[]
): messages.Envelope[] {
return envelopeObjects.filter((e: any) => {
return envelopeObjects.filter((e) => {
// filter off meta objects, almost none of it predictable/useful for testing
return doesNotHaveValue(e.meta)
})
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/test_case_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default class TestCaseRunner {
async invokeStep(
step: messages.PickleStep,
stepDefinition: IDefinition,
hookParameter?: any
hookParameter?: ITestCaseHookParameter
): Promise<messages.TestStepResult> {
return await StepRunner.run({
defaultTimeout: this.supportCodeLibrary.defaultTimeout,
Expand Down
6 changes: 3 additions & 3 deletions src/support_code_library_builder/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { buildParameterType } from './build_parameter_type'
import { SourcedParameterTypeRegistry } from './sourced_parameter_type_registry'

interface IStepDefinitionConfig {
code: any
code: Function
line: number
options: any
keyword: GherkinStepKeyword
Expand All @@ -52,14 +52,14 @@ interface ITestCaseHookDefinitionConfig {
}

interface ITestStepHookDefinitionConfig {
code: any
code: Function
line: number
options: any
uri: string
}

interface ITestRunHookDefinitionConfig {
code: any
code: Function
line: number
options: any
uri: string
Expand Down
2 changes: 1 addition & 1 deletion src/types/knuth-shuffle-seeded/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
declare module 'knuth-shuffle-seeded' {
export default function shuffle(inputArray: any[], seed?: any): any
export default function shuffle<T>(inputArray: T[], seed?: string): T[]
}

0 comments on commit 28683b3

Please sign in to comment.