An application produces a binary. It contains the minimal amount of code required to package many libraries to create an artifact that is deployable. All of the application's code is organized into libraries, except for some startup logic and maybe some basic routing.
The application will also define how to build the artifacts that are shipped to the user. Depending on the targets (desktop, mobile or web), we will have separate apps, one app for one target.
A library is a set of files packaged together that is consumed by applications. You can compare them withe node modules (npm packages) or Nuget packages. The libraries can be published to npm or just be bundled with a deployable application as-is.
The purpose of having libraries is to partition your code into smaller units that are easier to maintain and promote code reuse. They have a well-defined public API described inside the index.ts file, which servers as the entry-point of the library. Thi