Skip to content

Commit

Permalink
Adds class section
Browse files Browse the repository at this point in the history
  • Loading branch information
olih committed Jan 8, 2025
1 parent d8c0569 commit 0c6a3a5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/incy-wincy-model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {describeEnum} from 'faora-kai';
import { describeEnum, stringEffectFields, stringFields } from 'faora-kai';

Check failure on line 1 in src/incy-wincy-model.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and macOS-latest

'stringEffectFields' is declared but its value is never read.

Check failure on line 1 in src/incy-wincy-model.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and ubuntu-latest

'stringEffectFields' is declared but its value is never read.
import { z } from 'zod';

const programmingLanguageKey = ['js', 'ts', 'dart', 'python'] as const;
Expand Down Expand Up @@ -37,3 +37,19 @@ const blockKindlabels = {
const blockKind = z

Check failure on line 37 in src/incy-wincy-model.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and macOS-latest

'blockKind' is declared but its value is never read.

Check failure on line 37 in src/incy-wincy-model.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and ubuntu-latest

'blockKind' is declared but its value is never read.
.enum(blockKindKey)
.describe(describeEnum('Language block kind:', blockKindlabels));

const codeSection = {
name: stringFields.string1To80.describe('Name of the class'),
body: stringFields.string1To1000.describe('The full code of the block'),
uncommentedBody: stringFields.string1To1000.describe(
'The code of the block with comments removed'
),
keywords: stringFields.string1To1000
.optional()
.describe('Sorted keywords from the code'),
};

const classSection = z.object({

Check failure on line 52 in src/incy-wincy-model.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and macOS-latest

'classSection' is declared but its value is never read.

Check failure on line 52 in src/incy-wincy-model.ts

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node 18.x and ubuntu-latest

'classSection' is declared but its value is never read.
kind: z.literal('class').describe('Class'),
...codeSection,
});

0 comments on commit 0c6a3a5

Please sign in to comment.