File tree 2 files changed +2
-2
lines changed
examples/ts/express/mysql
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const pool = mysql.createPool({
17
17
if ( ! values ) {
18
18
return query
19
19
}
20
- return query . replace ( / \: ( \w + ) / g, function ( matchedSubstring : string , capturedValue ) {
20
+ return query . replace ( / \: ( \w + ) / g, function ( matchedSubstring : string , capturedValue : string ) {
21
21
if ( values . hasOwnProperty ( capturedValue ) ) {
22
22
return this . escape ( values [ capturedValue ] )
23
23
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const pool = mysql.createPool({
18
18
return query
19
19
}
20
20
<% - // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_the_replacement -%>
21
- return query .replace (/ \: (\w + )/ g , function (matchedSubstring : string , capturedValue ) {
21
+ return query .replace (/ \: (\w + )/ g , function (matchedSubstring : string , capturedValue : string ) {
22
22
if (values .hasOwnProperty (capturedValue)) {
23
23
return this .escape (values[capturedValue])
24
24
}
You can’t perform that action at this time.
0 commit comments