Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function subtractOffsetFromPosition<
T: {
+line: ?Number1,
+column: ?Number0,
...
},
>(pos: T, offset: GeneratedOffset): T {
return shiftPositionByOffset(pos, {
lines: neg(offset.lines),
columns: neg(offset.columns),
});
}
function subtractOffsetFromPosition<
T: {
+line: ?Number1,
+column: ?Number0,
...
},
>(pos: T, offset: GeneratedOffset): T {
return shiftPositionByOffset(pos, {
lines: neg(offset.lines),
columns: neg(offset.columns),
});
}