Skip to content

Commit f985873

Browse files
authored
Add explicit 'any' to evaluate() declaration
Without this, typescript will complain when used with '--noImplicitAny' option: ``` > tsc node_modules/jsonpath-plus/src/jsonpath.d.ts:179:5 - error TS7010: 'evaluate', which lacks return-type annotation, implicitly has an 'any' return type. 179 evaluate( ~~~~~~~~ node_modules/jsonpath-plus/src/jsonpath.d.ts:185:5 - error TS7010: 'evaluate', which lacks return-type annotation, implicitly has an 'any' return type. 185 evaluate(options: { ~~~~~~~~ Found 2 errors. ```
1 parent 2987402 commit f985873

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jsonpath.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ declare module 'jsonpath-plus' {
181181
json: JSONPathOptions['json'],
182182
callback: JSONPathOptions['callback'],
183183
otherTypeCallback: JSONPathOptions['otherTypeCallback']
184-
)
184+
): any
185185
evaluate(options: {
186186
path: JSONPathOptions['path'],
187187
json: JSONPathOptions['json'],
188188
callback: JSONPathOptions['callback'],
189189
otherTypeCallback: JSONPathOptions['otherTypeCallback']
190-
})
190+
}): any
191191
}
192192

193193
type JSONPathType = JSONPathCallable & JSONPathClass

0 commit comments

Comments
 (0)