1- import { messages } from "@cucumber/messages" ;
1+ import messages from "@cucumber/messages" ;
22
33import { assertAndReturn } from "./assertions" ;
44
55export function * traverseGherkinDocument (
6- gherkinDocument : messages . IGherkinDocument
6+ gherkinDocument : messages . GherkinDocument
77) {
88 yield gherkinDocument ;
99
@@ -12,7 +12,7 @@ export function* traverseGherkinDocument(
1212 }
1313}
1414
15- function * traverseFeature ( feature : messages . GherkinDocument . IFeature ) {
15+ function * traverseFeature ( feature : messages . Feature ) {
1616 yield feature ;
1717
1818 if ( feature . location ) {
@@ -32,9 +32,7 @@ function* traverseFeature(feature: messages.GherkinDocument.IFeature) {
3232 }
3333}
3434
35- function * traverseFeatureChild (
36- featureChild : messages . GherkinDocument . Feature . IFeatureChild
37- ) {
35+ function * traverseFeatureChild ( featureChild : messages . FeatureChild ) {
3836 yield featureChild ;
3937
4038 if ( featureChild . rule ) {
@@ -50,9 +48,7 @@ function* traverseFeatureChild(
5048 }
5149}
5250
53- function * traverseFeatureRule (
54- rule : messages . GherkinDocument . Feature . FeatureChild . IRule
55- ) {
51+ function * traverseFeatureRule ( rule : messages . Rule ) {
5652 yield rule ;
5753
5854 if ( rule . location ) {
@@ -66,9 +62,7 @@ function* traverseFeatureRule(
6662 }
6763}
6864
69- function * traverseRuleChild (
70- ruleChild : messages . GherkinDocument . Feature . FeatureChild . IRuleChild
71- ) {
65+ function * traverseRuleChild ( ruleChild : messages . RuleChild ) {
7266 yield ruleChild ;
7367
7468 if ( ruleChild . background ) {
@@ -80,9 +74,7 @@ function* traverseRuleChild(
8074 }
8175}
8276
83- function * traverseBackground (
84- backgorund : messages . GherkinDocument . Feature . IBackground
85- ) {
77+ function * traverseBackground ( backgorund : messages . Background ) {
8678 yield backgorund ;
8779
8880 if ( backgorund . location ) {
@@ -96,9 +88,7 @@ function* traverseBackground(
9688 }
9789}
9890
99- function * traverseScenario (
100- scenario : messages . GherkinDocument . Feature . IScenario
101- ) {
91+ function * traverseScenario ( scenario : messages . Scenario ) {
10292 yield scenario ;
10393
10494 if ( scenario . location ) {
@@ -118,7 +108,7 @@ function* traverseScenario(
118108 }
119109}
120110
121- function * traverseStep ( step : messages . GherkinDocument . Feature . IStep ) {
111+ function * traverseStep ( step : messages . Step ) {
122112 yield step ;
123113
124114 if ( step . location ) {
@@ -134,19 +124,15 @@ function* traverseStep(step: messages.GherkinDocument.Feature.IStep) {
134124 }
135125}
136126
137- function * traverseDocString (
138- docString : messages . GherkinDocument . Feature . Step . IDocString
139- ) {
127+ function * traverseDocString ( docString : messages . DocString ) {
140128 yield docString ;
141129
142130 if ( docString . location ) {
143131 yield docString . location ;
144132 }
145133}
146134
147- function * traverseDataTable (
148- dataTable : messages . GherkinDocument . Feature . Step . IDataTable
149- ) {
135+ function * traverseDataTable ( dataTable : messages . DataTable ) {
150136 yield dataTable ;
151137
152138 if ( dataTable . location ) {
@@ -160,7 +146,7 @@ function* traverseDataTable(
160146 }
161147}
162148
163- function * traverseRow ( row : messages . GherkinDocument . Feature . ITableRow ) {
149+ function * traverseRow ( row : messages . TableRow ) {
164150 yield row ;
165151
166152 if ( row . location ) {
@@ -174,19 +160,15 @@ function* traverseRow(row: messages.GherkinDocument.Feature.ITableRow) {
174160 }
175161}
176162
177- function * traverseCell (
178- cell : messages . GherkinDocument . Feature . TableRow . ITableCell
179- ) {
163+ function * traverseCell ( cell : messages . TableCell ) {
180164 yield cell ;
181165
182166 if ( cell . location ) {
183167 yield cell . location ;
184168 }
185169}
186170
187- function * traverseExample (
188- example : messages . GherkinDocument . Feature . Scenario . IExamples
189- ) {
171+ function * traverseExample ( example : messages . Examples ) {
190172 yield example ;
191173
192174 if ( example . location ) {
@@ -205,7 +187,7 @@ function* traverseExample(
205187}
206188
207189export function collectTagNames (
208- tags : messages . GherkinDocument . Feature . ITag [ ] | null | undefined
190+ tags : readonly ( messages . Tag | messages . PickleTag ) [ ] | null | undefined
209191) {
210192 return (
211193 tags ?. map ( ( tag ) =>
0 commit comments