[ad_1]

The aim is to develop a simple one-page TypeScript app for a library to maintain a small database of book information while the browser window is open. You can initialize your app with hardcoded data, or you can start with an empty data structure. Types are important in your code; however, there is no need to type everything, and general applicability of typing is as you have seen in the study guide. For example, there is no need to define a function type in a function definition as TypeScript and the reader can easily deduce the type from the function definition. You will have to type parameters and return values, though. Marks may be deducted for too few type definitions, i.e. writing JavaScript instead of TypeScript.

The book data has the following fields:

ISBN
Title
Author
Publication Date
Number of Pages
Availability (“Paperback”, “eBook”, “Audio book”)
Edition

The data has the following requirements (1 mark):
Each record must have a value for all fields. Only the Edition field can be blank.
The book Availability must be one of the options shown.
An ISBN can only be entered and saved once (it must be unique for each book).

Your database would probably be a TypeScript array of JavaScript objects, each of which has properties corresponding to the above fields. You can use another data structure if you wish, but types will be necessary to ensure the integrity of the data

Sample Solution

The post Programming mobile system appeared first on acestar tutors.

[ad_2]

Source link