mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 04:46:57 -04:00
* feat: add ambient module stubs for declaration generation Provide TypeScript ambient declarations for 'message_keys' (Pebble SDK module) and './tmp/config-page.html' (build artefact) so tsc can resolve these imports when generating .d.ts files. * feat: add tsconfig for declaration generation Configures tsc --allowJs --emitDeclarationOnly to generate per-file .d.ts reference output in dist-types/ from the library source files. * feat: add curated TypeScript declarations for public API Hand-curated index.d.ts covering Clay, ClayConfig, ClayItem, ClayEvents, manipulators, and all supporting types. Necessary because tsc cannot infer the ClayEvents mixin or dynamically-bound manipulator methods. All types are exported via the Clay namespace. * test: add type-checking verification for index.d.ts Exercises the full public API surface — constructor, instance/static methods, ClayConfig/ClayItem event methods, manipulator methods, namespace-exported types, and customFn this-context. * build: add typescript devDependency, types field, and build scripts Adds typescript 6.0.2 as a devDependency. Sets "types": "index.d.ts" in package.json. Adds build:types and check:types scripts. * build: add gulp types task to validate declarations on build Validates index.d.ts against test/type-checks.ts as part of the default gulp build. Reference declaration generation via build:types remains available as a separate manual step. * chore: update ignore files for TypeScript declarations Add dist-types/ to .gitignore (build artefact). Whitelist index.d.ts in .npmignore so type declarations ship with the package. * ci: add typecheck workflow to validate TypeScript declarations Runs npm run check:types on push and PR to main, matching the existing lint/test/build workflow pattern.
15 lines
262 B
JSON
15 lines
262 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2015",
|
|
"module": "commonjs",
|
|
"moduleResolution": "node10",
|
|
"esModuleInterop": true,
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"ignoreDeprecations": "6.0"
|
|
},
|
|
"include": [
|
|
"test/type-checks.ts"
|
|
]
|
|
}
|