-
Suggestion: get rid of unused code
I suggest to turn on
noUnusedParameters
andnoUnusedLocals
, then cleanup all the instances. -
Suggestion: get rid of
any
,as
Need to review usages of any
and EXPR as TYPE
. The latter in most cases
diff --git a/nextjs-api/types.ts b/nextjs-api/types.ts | |
index c7a7b7b..bff8e10 100644 | |
--- a/nextjs-api/types.ts | |
+++ b/nextjs-api/types.ts | |
@@ -28,29 +28,21 @@ export interface MakeEndpointConstruct<C, R, U, D> { | |
// TODO: How to make optional types work with generics?! | |
export interface EndpointConstructClient<C, R, U, D, URLParams> { | |
// FIXME - this is not working | |
- post?: C extends undefined | |
- ? undefined |
type CmdArgsResult<C> = C extends Cmd<[], null, infer _O, infer _C> | |
? [] | |
: C extends Cmd<infer A, null, infer _O, infer _C> | |
? [...{ [K in keyof A]: ArgResult<A[K]> }] | |
: C extends Cmd<[], infer RA, infer _O, infer _C> | |
? WithArgRestResult<[], RA> | |
: C extends Cmd<infer A, infer RA, infer _O, infer _C> | |
? WithArgRestResult<[...{ [K in keyof A]: ArgResult<A[K]> }], RA> | |
: never; |
{ | |
let collect state acc buf = | |
let should_collect = | |
match state with | |
| `empty -> true | |
| `start | `non_empty -> Buffer.length buf > 0 | |
in | |
if should_collect | |
then ( |
path = [] | |
dirs = set() | |
size = {} | |
lines = [line.strip() for line in open("./aoc7.data")] | |
while lines: | |
line = lines.pop(0) | |
if line == "$ cd /": line = "$ cd C:" | |
if line == "$ cd ..": | |
path.pop() | |
elif line.startswith("$ cd "): |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.ASAPConfig = {"basePath":""}; | |
window.ASAPBootConfig = {"basePath":"","initialPath":"/hello/message","js":"/__static/__main__-524CBTGD.js","css":"/__static/__main__-M2L2B7QS.css"}; | |
</script> | |
<script type="module" src="/__static/__main__-524CBTGD.js"></script> | |
<link rel="stylesheet" href="/__static/__main__-M2L2B7QS.css"/> | |
</head> |
export declare class TreeCursor implements SyntaxNodeRef { | |
type: NodeType; | |
get name(): string; | |
from: number; | |
to: number; | |
private stack; | |
private bufferNode; | |
private yieldNode; | |
private yieldBuf; | |
private yield; |
diff --git a/makefile b/makefile | |
index bf26179..6f02914 100644 | |
--- a/makefile | |
+++ b/makefile | |
@@ -87,8 +87,13 @@ else | |
endif | |
endif | |
ifeq ($(i_FFI),2) | |
+ifeq ($(shell command -v pkg-config 2>&1 > /dev/null && pkg-config --exists libffi && echo $$?),0) | |
+ i_LD_LIBS += $(shell pkg-config --libs libffi) |
module Ink | |
mutable struct Thunk | |
f::Function | |
result::Any | |
sub::Vector{Thunk} | |
sup::Vector{Thunk} | |
clean::Bool | |
end |
function NBG_CURRENCY(currency, date) { | |
let [m, d, y] = [date.getMonth(), date.getDate(), date.getFullYear()]; | |
let dates = `${y}-${m+1}-${d}` | |
let url = `https://nbg.gov.ge/gw/api/ct/monetarypolicy/currencies/en/json/?currencies=${currency}&date=${dates}`; | |
let resp = UrlFetchApp.fetch(url); | |
return JSON.parse(resp.getContentText())[0].currencies[0].rate; | |
} |