diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-12 18:45:58 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-12 18:45:58 +0530 |
| commit | 851f48856984076d2571152bde322688ba4946f2 (patch) | |
| tree | d77a37b8de0f5a8b06b2afb83d7e4af39fc84a73 /src | |
| parent | ca80dee29014298bd8a1a82bd0418cc073a76316 (diff) | |
| download | css-everything-851f48856984076d2571152bde322688ba4946f2.tar.gz css-everything-851f48856984076d2571152bde322688ba4946f2.zip | |
chore: prettier + eslint magic
Diffstat (limited to '')
| -rw-r--r-- | src/eval.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/eval.ts b/src/eval.ts index 36a9e67..8aeaf09 100644 --- a/src/eval.ts +++ b/src/eval.ts @@ -1,7 +1,7 @@ import { CSSUnit, Expr } from './parser' import { match, matchString } from './utils/adt' -export type EvalActions = { +export interface EvalActions { addClass(id: string, classes: string): Promise<void> removeClass(id: string, classes: string): Promise<void> delay(num: number): Promise<void> @@ -98,9 +98,7 @@ const getFunctions = (name: string, args: Expr[], actions: EvalActions) => request: async () => { const url = await evalExpr(args[0], actions) - const method = args[1] - ? (await evalExpr(args[1], actions)) ?? 'post' - : 'post' + const method = (args[1] && (await evalExpr(args[1], actions))) ?? 'post' if (url) { const data = await actions.getFormData() |
