From 05422784672491e609c5e1d276fcadab6bbd3870 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 16 Jan 2023 15:43:45 +0300 Subject: [PATCH] Added descriptions in interfaces --- package.json | 2 +- .../create-element/create-element.interface.ts | 3 +++ src/components/utils/urils.interface.ts | 6 ++++++ src/interfaces/cg-select.interface.ts | 6 ++++++ src/interfaces/items.interface.ts | 3 +++ src/interfaces/language.interface.ts | 3 +++ tsconfig.json | 15 +++++++-------- 7 files changed, 29 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 10a7f63..9b9c8b7 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "homepage": "https://cg-select.itguild.info", "scripts": { "start": "parcel example/index.html -p 4500 --open ", - "build": "parcel build index.js", + "build": "parcel build index.ts", "deploy": "gh-pages -d dist", "predeploy": "npm run build" }, diff --git a/src/components/create-element/create-element.interface.ts b/src/components/create-element/create-element.interface.ts index b0acac0..e80974e 100644 --- a/src/components/create-element/create-element.interface.ts +++ b/src/components/create-element/create-element.interface.ts @@ -1,5 +1,8 @@ import { ICgSelect } from '../../interfaces/cg-select.interface'; +/** + * @description Настройки для создания чипсов. + */ export interface ICreateBreadCrumb { /** * Определенный экземпляр класса. diff --git a/src/components/utils/urils.interface.ts b/src/components/utils/urils.interface.ts index 630f2ee..d5887a2 100644 --- a/src/components/utils/urils.interface.ts +++ b/src/components/utils/urils.interface.ts @@ -1,5 +1,8 @@ import { IItems } from '../../interfaces/items.interface'; +/** + * @description Настройки получаемых элементов. + */ export interface IDataItem { /** * Необязательный параметр. Категория группы элементов. @@ -18,6 +21,9 @@ export interface IDataItem { ItemValue: string | IItems | number; } +/** + * @description Настройки для текста селекта и тд. + */ export interface ISelectedItems { /** * Placeholder необязательный параметр, в который передается текст плейсхолдера селекта. diff --git a/src/interfaces/cg-select.interface.ts b/src/interfaces/cg-select.interface.ts index d020db4..6d0c9c1 100644 --- a/src/interfaces/cg-select.interface.ts +++ b/src/interfaces/cg-select.interface.ts @@ -1,5 +1,8 @@ import { IItems } from './items.interface'; +/** + * @description Настройки селекта. + */ export interface ICgSelect { /** * Уникальный селектор - *обязательный параметр(индефикатор), который задаеться при создании селекта. @@ -91,6 +94,9 @@ export interface ICgSelect { multiselectTag?: boolean; } +/** + * @description Настройки стилей. + */ export interface IStyle { /** * Кастомизация кнопки селекта. diff --git a/src/interfaces/items.interface.ts b/src/interfaces/items.interface.ts index b827cfd..a6c1616 100644 --- a/src/interfaces/items.interface.ts +++ b/src/interfaces/items.interface.ts @@ -1,3 +1,6 @@ +/** + * @description Строение элемента. + */ export interface IItems { /** * Уникальное ID элемента diff --git a/src/interfaces/language.interface.ts b/src/interfaces/language.interface.ts index c2665f7..c9a63e5 100644 --- a/src/interfaces/language.interface.ts +++ b/src/interfaces/language.interface.ts @@ -1,3 +1,6 @@ +/** + * @description Настройки для добавления языков. + */ export interface ILanguage { /** * Текст в поиске. diff --git a/tsconfig.json b/tsconfig.json index 518d585..358226c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - /* Projects */ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ @@ -10,7 +9,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2017", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -24,7 +23,7 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ + "module": "commonjs" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ @@ -48,7 +47,7 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "build" /* Specify an output folder for all emitted files. */, // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ @@ -70,12 +69,12 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ + "strict": true /* Enable all strict type-checking options. */, // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ @@ -97,6 +96,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ } }