Skip to content

Commit

Permalink
fix: Export types
Browse files Browse the repository at this point in the history
  • Loading branch information
EGAMAGZ committed Apr 24, 2024
1 parent 61f37df commit 9af9158
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 7 deletions.
5 changes: 2 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egamagz/paska-ovo",
"version": "0.0.1",
"version": "0.1.0",
"exports": "./mod.ts",
"compilerOptions": {
"lib": [
Expand All @@ -14,7 +14,6 @@
"@std/testing": "https://deno.land/[email protected]/assert/mod.ts"
},
"tasks": {
"doc": "deno doc --html --name='Paska Ovo' src",
"astro:dev": "cd www && deno run -A --unstable npm:astro@latest dev"
"doc": "deno doc --html --name='Paska Ovo' src"
}
}
197 changes: 197 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./src/paska-ovo.ts";
export * from "./src/historical-codes.ts";
export * from "./src/historical-codes.ts";
export * from "./src/types.ts";
4 changes: 2 additions & 2 deletions src/paska-ovo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class PaskaOvo {
* @return {this} - Current instance of PaskaOvo.
*/
public addCode(code: string, fn: () => void, tag: string): this {
this.easterEggs.push({ code: codeToChars(code), fn, tag });
this.easterEggs.push({ code: codeToChars(code), callback, tag });

return this;
}
Expand All @@ -63,7 +63,7 @@ export class PaskaOvo {
const matches = this.keysPressed.toString().includes(easterEgg.code);

if (matches) {
easterEgg.fn();
easterEgg.callback();

this.callbacks.forEach(callback => callback(easterEgg));

Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

/**
* Type with the properties of an easter egg.
*
*/
export type EasterEgg = {
code: string,
fn: () => void,
callback: () => void,
tag: string
};

Expand Down

0 comments on commit 9af9158

Please sign in to comment.