Mark several unused vars as such
This commit is contained in:
@@ -37,7 +37,7 @@ const processedRoutes: { [K in Method]: ProcessedRoute[] } = {
|
|||||||
DELETE: [],
|
DELETE: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
function isPromise<T>(value: T | Promise<T>): value is Promise<T> {
|
function _isPromise<T>(value: T | Promise<T>): value is Promise<T> {
|
||||||
return typeof (value as any)?.then === "function";
|
return typeof (value as any)?.then === "function";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ type Message = {
|
|||||||
text: AtLeastOne<string>;
|
text: AtLeastOne<string>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const m1: Message = { timestamp: 123, source: "logging", text: ["foo"] };
|
const _m1: Message = { timestamp: 123, source: "logging", text: ["foo"] };
|
||||||
const m2: Message = {
|
const _m2: Message = {
|
||||||
timestamp: 321,
|
timestamp: 321,
|
||||||
source: "diagnostic",
|
source: "diagnostic",
|
||||||
text: ["ok", "whatever"],
|
text: ["ok", "whatever"],
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const routes: Route[] = [
|
|||||||
{
|
{
|
||||||
path: "/list",
|
path: "/list",
|
||||||
methods: ["GET"],
|
methods: ["GET"],
|
||||||
handler: async (call: Call): Promise<Result> => {
|
handler: async (_call: Call): Promise<Result> => {
|
||||||
const code = httpCodes.success.OK;
|
const code = httpCodes.success.OK;
|
||||||
const lr = (rr: Route[]) => {
|
const lr = (rr: Route[]) => {
|
||||||
const ret = rr.map((r: Route) => {
|
const ret = rr.map((r: Route) => {
|
||||||
@@ -67,7 +67,7 @@ const routes: Route[] = [
|
|||||||
`;
|
`;
|
||||||
const result = nunjucks.renderString(template, { rrr });
|
const result = nunjucks.renderString(template, { rrr });
|
||||||
|
|
||||||
const listing = lr(routes).join(", ");
|
const _listing = lr(routes).join(", ");
|
||||||
return {
|
return {
|
||||||
code,
|
code,
|
||||||
result,
|
result,
|
||||||
|
|||||||
Reference in New Issue
Block a user