Skip to content

Commit

Permalink
feat: add tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
vixalien committed Aug 12, 2024
1 parent 0d7b489 commit dd1f659
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ __pycache__
.idea
.vscode

# compiled typescript
out

# Project files - sync with Makefile
src/*/settings
src/*/workbench.vala
Expand Down
20 changes: 20 additions & 0 deletions ambient/workbench.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="../workbench-types/adw-1.d.ts" />
/// <reference path="../workbench-types/gtk-4.0.d.ts" />
/// <reference path="../workbench-types/gobject-2.0.d.ts" />

import Gtk from "gi://Gtk?version=4.0";
import Adw from "gi://Adw";
import GObject from "gi://GObject";

declare global {
// global workbench object
declare const workbench: {
window: Adw.ApplicationWindow;
application: Adw.Application;
builder: Gtk.Builder;
template: string;
resolve(path: string): string;
preview(object: Gtk.Widget): void;
build(params: Record<string, Function | GObject.Object>): void;
};
}
15 changes: 15 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"module": "ES2022",
"moduleResolution": "Bundler",
"target": "ES2022",
"outDir": "out",
"skipLibCheck": true,
"lib": ["ES2022"]
},
"include": [
"src/**/*.ts",
"./workbench-types/index.d.ts",
"./ambient/workbench.d.ts",
]
}

0 comments on commit dd1f659

Please sign in to comment.