From f5e0a43652698e04c579000d06099cfa52eaecd7 Mon Sep 17 00:00:00 2001 From: Marak Date: Thu, 1 Feb 2024 06:56:32 -0500 Subject: [PATCH] Clean-up types file --- types.ts | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/types.ts b/types.ts index 71d49a3..d4a4ad0 100644 --- a/types.ts +++ b/types.ts @@ -49,12 +49,10 @@ declare class TileMap { // // TileSet // - // Interface for Tile objects interface Tile { id: number; name: string; - // Add other properties here as needed, such as 'properties' if they have a specific structure } // Interface for the constructor options @@ -74,7 +72,6 @@ declare class TileSet { // // LSystem // - // Interface for the constructor options of LSystem interface LSystemOptions { tileset: TileSet; @@ -108,9 +105,7 @@ declare class LSystem { axiom: string; rules: { [tileName: string]: string | ((context: RuleContext) => string) }; generations: number; - constructor(options: LSystemOptions); - getTileId(tileName: string): number | null; applyRule(tileId: number, tileMap: TileMap): number; applyTo(tileMap: TileMap): void; @@ -119,7 +114,6 @@ declare class LSystem { // // Biome // - // Interface for the constructor options of Biome interface BiomeOptions { name: string; @@ -140,11 +134,9 @@ declare class Biome { // // labyrinthos // - // Define a generic type for maze generation functions export type MazeGeneratorFunction = (tileMap: TileMap, options: any) => void; // Replace 'any' with a more specific type if you have a shared options structure - interface mazes { AldousBroder: MazeGeneratorFunction; AldousBroder3D: MazeGeneratorFunction; @@ -170,15 +162,13 @@ interface shapes { interface terrains { FaultLine: MazeGeneratorFunction; PerlinNoise: MazeGeneratorFunction; - // Define terrain generators here if they have a similar signature + // Define additional terrain generators here if they have a similar signature } -interface Utils { - // If the utilities have different signatures, define them individually - // Otherwise, you can use a similar approach as with the mazes +interface utils { + // Define utility functions here } - interface labyrinthos { TileMap: typeof TileMap; TileSet: typeof TileSet; @@ -187,7 +177,7 @@ interface labyrinthos { mazes: mazes; shapes: shapes; terrains: terrains; - utils: Utils; + utils: utils; } export { @@ -197,8 +187,4 @@ export { LSystem, mazes, labyrinthos -} - -// import labyrinthos from './lib/labyrinthos'; - -//export default labyrinthos as Labyrinthos; +} \ No newline at end of file