aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
174 stars 80 forks source link

Feature: Typescript definition files #112

Closed JuliaABurch closed 2 years ago

JuliaABurch commented 2 years ago

Description

This commit fixes up the JSDocs for the @amazon-sumerian-hosts/babylon package, primarily by typedefing several object structures used throughout HostObject, and standardizing the way we refer to types from external modules (AWS SDK, BabylonJS, etc). Typescript unfortunately doesn't support the external tag, and will generate nonsense from it.

Typescript is added as a dev-dependency, along with a build target that will compile definition files from the JSDoc documentation.

To add type definitions for the other submodules, a tsconfig.json file needs to be added at the root of that submodule (it can largely be copied from the tsconfig.json file defined for the @amazon-sumerian-hosts/babylon package.) Then a project reference needs to be added to the monorepo's tsconfig.json, so that the compiler knows where to find those nested tsconfig.json files.

Reviewer Testing Instructions

Submission Checklist

I confirm that I have...


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.