From c461d221b31468ee7cb2f590bd6d671661c653a3 Mon Sep 17 00:00:00 2001 From: Florian Mutter Date: Fri, 11 Aug 2023 09:02:59 +0200 Subject: [PATCH] Fix type import from cucumber-expressions ParameterType is now properly exported so no need to directly reference it. Without this change tsc files for me with the following error: ``` node_modules/@cucumber/cucumber/lib/support_code_library_builder/sourced_parameter_type_registry.d.ts:2:27 - error TS2307: Cannot find module '@cucumber/cucumber-expressions/dist/cjs/src/ParameterType' or its corresponding type declarations. 2 import ParameterType from '@cucumber/cucumber-expressions/dist/cjs/src/ParameterType'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Found 1 error in node_modules/@cucumber/cucumber/lib/support_code_library_builder/sourced_parameter_type_registry.d.ts:2 ``` --- .../sourced_parameter_type_registry.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/support_code_library_builder/sourced_parameter_type_registry.ts b/src/support_code_library_builder/sourced_parameter_type_registry.ts index c2d2f035a..0fcebd724 100644 --- a/src/support_code_library_builder/sourced_parameter_type_registry.ts +++ b/src/support_code_library_builder/sourced_parameter_type_registry.ts @@ -1,5 +1,7 @@ -import { ParameterTypeRegistry } from '@cucumber/cucumber-expressions' -import ParameterType from '@cucumber/cucumber-expressions/dist/cjs/src/ParameterType' +import { + ParameterType, + ParameterTypeRegistry, +} from '@cucumber/cucumber-expressions' import { ILineAndUri } from '../types' export class SourcedParameterTypeRegistry extends ParameterTypeRegistry {