Перейти к содержанию

Typescript Imports

Материал из RAGE MP Wiki Archive
Версия от 17:52, 16 августа 2018; imported>Stuyk
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Initialize Directory

Open the folder in Visual Studio Code. Setup a typescript workspace there.

tsc --init

TSConfig Info

Set this up in your TSConfig file to support correct path. Restart your client after editing.

"baseUrl": "./",

Import Syntax

At the top of your file add the following with the correct path:

import * as NameOfResource from "resource/path/of/file/from/clientside_packages/directory";