@fplpool/fpl-models 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/config/index.d.ts +34 -0
  2. package/dist/config/index.d.ts.map +1 -0
  3. package/{src/config/index.ts → dist/config/index.js} +7 -8
  4. package/dist/config/index.js.map +1 -0
  5. package/dist/enums/status-code.enum.d.ts +32 -0
  6. package/dist/enums/status-code.enum.d.ts.map +1 -0
  7. package/dist/enums/status-code.enum.js +36 -0
  8. package/dist/enums/status-code.enum.js.map +1 -0
  9. package/dist/enums/status.enum.d.ts +7 -0
  10. package/dist/enums/status.enum.d.ts.map +1 -0
  11. package/dist/enums/status.enum.js +10 -0
  12. package/dist/enums/status.enum.js.map +1 -0
  13. package/dist/errors/advanced.error.d.ts +5 -0
  14. package/dist/errors/advanced.error.d.ts.map +1 -0
  15. package/dist/errors/advanced.error.js +10 -0
  16. package/dist/errors/advanced.error.js.map +1 -0
  17. package/dist/index.d.ts +41 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +82 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/models/card.model.d.ts +22 -0
  22. package/dist/models/card.model.d.ts.map +1 -0
  23. package/{src/models/card.model.ts → dist/models/card.model.js} +20 -35
  24. package/dist/models/card.model.js.map +1 -0
  25. package/dist/models/config.model.d.ts +21 -0
  26. package/dist/models/config.model.d.ts.map +1 -0
  27. package/{src/models/config.model.ts → dist/models/config.model.js} +8 -23
  28. package/dist/models/config.model.js.map +1 -0
  29. package/dist/models/invoice.model.d.ts +35 -0
  30. package/dist/models/invoice.model.d.ts.map +1 -0
  31. package/dist/models/invoice.model.js +79 -0
  32. package/dist/models/invoice.model.js.map +1 -0
  33. package/dist/models/job.model.d.ts +26 -0
  34. package/dist/models/job.model.d.ts.map +1 -0
  35. package/dist/models/job.model.js +48 -0
  36. package/dist/models/job.model.js.map +1 -0
  37. package/dist/models/pool-gameweek-deadline.model.d.ts +22 -0
  38. package/dist/models/pool-gameweek-deadline.model.d.ts.map +1 -0
  39. package/dist/models/pool-gameweek-deadline.model.js +42 -0
  40. package/dist/models/pool-gameweek-deadline.model.js.map +1 -0
  41. package/dist/models/pool-gameweek-winner.model.d.ts +24 -0
  42. package/dist/models/pool-gameweek-winner.model.d.ts.map +1 -0
  43. package/dist/models/pool-gameweek-winner.model.js +43 -0
  44. package/dist/models/pool-gameweek-winner.model.js.map +1 -0
  45. package/dist/models/pool-gameweek.model.d.ts +27 -0
  46. package/dist/models/pool-gameweek.model.d.ts.map +1 -0
  47. package/dist/models/pool-gameweek.model.js +99 -0
  48. package/dist/models/pool-gameweek.model.js.map +1 -0
  49. package/dist/models/pool-invite.model.d.ts +26 -0
  50. package/dist/models/pool-invite.model.d.ts.map +1 -0
  51. package/dist/models/pool-invite.model.js +54 -0
  52. package/dist/models/pool-invite.model.js.map +1 -0
  53. package/dist/models/pool-member.model.d.ts +22 -0
  54. package/dist/models/pool-member.model.d.ts.map +1 -0
  55. package/dist/models/pool-member.model.js +45 -0
  56. package/dist/models/pool-member.model.js.map +1 -0
  57. package/dist/models/pool-transaction.model.d.ts +31 -0
  58. package/dist/models/pool-transaction.model.d.ts.map +1 -0
  59. package/dist/models/pool-transaction.model.js +109 -0
  60. package/dist/models/pool-transaction.model.js.map +1 -0
  61. package/dist/models/pool-wallet.model.d.ts +18 -0
  62. package/dist/models/pool-wallet.model.d.ts.map +1 -0
  63. package/dist/models/pool-wallet.model.js +86 -0
  64. package/dist/models/pool-wallet.model.js.map +1 -0
  65. package/dist/models/pool.model.d.ts +42 -0
  66. package/dist/models/pool.model.d.ts.map +1 -0
  67. package/{src/models/pool.model.ts → dist/models/pool.model.js} +33 -65
  68. package/dist/models/pool.model.js.map +1 -0
  69. package/dist/models/session.model.d.ts +19 -0
  70. package/dist/models/session.model.d.ts.map +1 -0
  71. package/dist/models/session.model.js +28 -0
  72. package/dist/models/session.model.js.map +1 -0
  73. package/dist/models/transaction.model.d.ts +32 -0
  74. package/dist/models/transaction.model.d.ts.map +1 -0
  75. package/{src/models/transaction.model.ts → dist/models/transaction.model.js} +38 -65
  76. package/dist/models/transaction.model.js.map +1 -0
  77. package/dist/models/user-settings.model.d.ts +20 -0
  78. package/dist/models/user-settings.model.d.ts.map +1 -0
  79. package/{src/models/user-settings.model.ts → dist/models/user-settings.model.js} +14 -29
  80. package/dist/models/user-settings.model.js.map +1 -0
  81. package/dist/models/user.model.d.ts +23 -0
  82. package/dist/models/user.model.d.ts.map +1 -0
  83. package/{src/models/user.model.ts → dist/models/user.model.js} +20 -37
  84. package/dist/models/user.model.js.map +1 -0
  85. package/dist/models/wallet.model.d.ts +23 -0
  86. package/dist/models/wallet.model.d.ts.map +1 -0
  87. package/dist/models/wallet.model.js +141 -0
  88. package/dist/models/wallet.model.js.map +1 -0
  89. package/dist/repositories/generic.repository.d.ts +17 -0
  90. package/dist/repositories/generic.repository.d.ts.map +1 -0
  91. package/dist/repositories/generic.repository.js +55 -0
  92. package/dist/repositories/generic.repository.js.map +1 -0
  93. package/dist/types/pool.d.ts +6 -0
  94. package/dist/types/pool.d.ts.map +1 -0
  95. package/dist/types/pool.js +10 -0
  96. package/dist/types/pool.js.map +1 -0
  97. package/dist/types/wallet.d.ts +16 -0
  98. package/dist/types/wallet.d.ts.map +1 -0
  99. package/dist/types/wallet.js +22 -0
  100. package/dist/types/wallet.js.map +1 -0
  101. package/package.json +11 -4
  102. package/src/index.ts +0 -19
  103. package/src/models/invoice.model.ts +0 -100
  104. package/src/models/job.model.ts +0 -62
  105. package/src/models/pool-gameweek-deadline.model.ts +0 -46
  106. package/src/models/pool-gameweek-winner.model.ts +0 -55
  107. package/src/models/pool-gameweek.model.ts +0 -114
  108. package/src/models/pool-invite.model.ts +0 -65
  109. package/src/models/pool-member.model.ts +0 -53
  110. package/src/models/pool-transaction.model.ts +0 -130
  111. package/src/models/pool-wallet.model.ts +0 -89
  112. package/src/models/session.model.ts +0 -45
  113. package/src/models/wallet.model.ts +0 -154
  114. package/src/repositories/generic.repository.ts +0 -86
  115. package/tsconfig.json +0 -103
@@ -1,89 +0,0 @@
1
- import { Schema, model, Types, Document } from "mongoose";
2
- import config from "../config";
3
- import { poolAmountPattern } from "./pool-transaction.model";
4
-
5
-
6
-
7
- export interface IPoolWallet extends Document {
8
- _id: Types.ObjectId;
9
- pool: Types.ObjectId;
10
- balance: string;
11
- availableBalance: string;
12
- createdAt: Date;
13
- updatedAt: Date;
14
- }
15
-
16
- const poolWalletSchema = new Schema<IPoolWallet>({
17
- pool: {
18
- type: Schema.Types.ObjectId,
19
- ref: config.models.pool,
20
- required: true
21
- },
22
- balance: {
23
- type: String,
24
- required: true,
25
- match: poolAmountPattern,
26
- set: function(value: string) {
27
- // If value already looks like a float (has a .), ensure two decimals
28
- if (typeof value === "string") {
29
- if (poolAmountPattern.test(value)) {
30
- // If it has a dot but is not two decimals, pad right
31
- if (value.indexOf('.') !== -1) {
32
- let [whole, decimals] = value.split('.');
33
- if (decimals === undefined) return whole + ".00";
34
- if (decimals.length === 1) return whole + "." + decimals + "0";
35
- if (decimals.length === 2) return value;
36
- if (decimals.length > 2) return whole + "." + decimals.slice(0,2);
37
- }
38
- // No decimal: add .00
39
- return value + ".00";
40
- }
41
- // If it's an integer, add .00
42
- if (/^\d+$/.test(value)) {
43
- return value + ".00";
44
- }
45
- }
46
- return value;
47
- },
48
- default: "0.00"
49
- },
50
- availableBalance: {
51
- type: String,
52
- required: false,
53
- match: poolAmountPattern,
54
- set: function(value: string) {
55
- // If value already looks like a float (has a .), ensure two decimals
56
- if (typeof value === "string") {
57
- if (poolAmountPattern.test(value)) {
58
- // If it has a dot but is not two decimals, pad right
59
- if (value.indexOf('.') !== -1) {
60
- let [whole, decimals] = value.split('.');
61
- if (decimals === undefined) return whole + ".00";
62
- if (decimals.length === 1) return whole + "." + decimals + "0";
63
- if (decimals.length === 2) return value;
64
- if (decimals.length > 2) return whole + "." + decimals.slice(0,2);
65
- }
66
- // No decimal: add .00
67
- return value + ".00";
68
- }
69
- // If it's an integer, add .00
70
- if (/^\d+$/.test(value)) {
71
- return value + ".00";
72
- }
73
- }
74
- return value;
75
- },
76
- default: "0.00"
77
- }
78
- }, {
79
- timestamps: true,
80
- toJSON: {virtuals: true},
81
- toObject: {virtuals: true}
82
- })
83
-
84
-
85
-
86
-
87
- const PoolWallet = model<IPoolWallet>(config.models.poolWallet, poolWalletSchema);
88
-
89
- export default PoolWallet;
@@ -1,45 +0,0 @@
1
- import {Schema, model, Types, Document} from "mongoose";
2
-
3
- import config from "../config";
4
-
5
-
6
-
7
-
8
- export interface ISession extends Document{
9
- _id: Types.ObjectId;
10
- user: Types.ObjectId;
11
- userAgent: String;
12
- device: Object;
13
- expired: Boolean;
14
- createdAt: Date;
15
- updatedAt: Date;
16
- }
17
-
18
-
19
- const sessionSchema = new Schema<ISession>({
20
- user: {
21
- type: Schema.Types.ObjectId,
22
- ref: config.models.user,
23
- required: true
24
- },
25
- device: Object,
26
- userAgent: String,
27
- expired: {
28
- required: true,
29
- type: Boolean,
30
- default: false
31
- },
32
- },
33
- {
34
- timestamps: true,
35
- toJSON: {virtuals: true},
36
- toObject: {virtuals: true}
37
- });
38
-
39
-
40
-
41
-
42
- const Session = model<ISession>(config.models.session, sessionSchema);
43
-
44
-
45
- export default Session;
@@ -1,154 +0,0 @@
1
- import {Schema, model, Types, Document} from "mongoose";
2
-
3
- import config from "../config";
4
- import { poolAmountPattern } from "./pool-transaction.model";
5
- import { ITransaction } from "./transaction.model";
6
- import AdvancedError from "../errors/advanced.error";
7
- import StatusCode from "../enums/status-code.enum";
8
- import { TransactionStatus, TransactionType } from "../types/wallet";
9
- import transactionLogger from "../loggers/transaction";
10
-
11
-
12
-
13
- export interface IWallet extends Document {
14
- _id: Types.ObjectId;
15
- user: Types.ObjectId;
16
- cards: Types.ObjectId[];
17
- balance: string;
18
- availableBalance: string;
19
- customerId?: string;
20
- createdAt: Date;
21
- updatedAt: Date;
22
- debit: (transaction: ITransaction) => Promise<void>;
23
- refund: (transaction: ITransaction) => Promise<void>;
24
- }
25
-
26
-
27
-
28
- const walletSchema = new Schema<IWallet>({
29
- user: {
30
- type: Schema.Types.ObjectId,
31
- ref: config.models.user,
32
- required: true,
33
- unique: [true, 'User already has a wallet'],
34
- },
35
- customerId: {
36
- type: String,
37
- required: false,
38
- default: null,
39
- unique: true
40
- },
41
- cards: [{
42
- type: Schema.Types.ObjectId,
43
- ref: config.models.card
44
- }],
45
- balance: {
46
- type: String,
47
- required: true,
48
- match: poolAmountPattern,
49
- set: function(value: string) {
50
- // If value already looks like a float (has a .), ensure two decimals
51
- if (typeof value === "string") {
52
- if (poolAmountPattern.test(value)) {
53
- // If it has a dot but is not two decimals, pad right
54
- if (value.indexOf('.') !== -1) {
55
- let [whole, decimals] = value.split('.');
56
- if (decimals === undefined) return whole + ".00";
57
- if (decimals.length === 1) return whole + "." + decimals + "0";
58
- if (decimals.length === 2) return value;
59
- if (decimals.length > 2) return whole + "." + decimals.slice(0,2);
60
- }
61
- // No decimal: add .00
62
- return value + ".00";
63
- }
64
- // If it's an integer, add .00
65
- if (/^\d+$/.test(value)) {
66
- return value + ".00";
67
- }
68
- }
69
- return value;
70
- },
71
- default: "0.00"
72
- },
73
- availableBalance: {
74
- type: String,
75
- required: false,
76
- match: poolAmountPattern,
77
- set: function(value: string) {
78
- // If value already looks like a float (has a .), ensure two decimals
79
- if (typeof value === "string") {
80
- if (poolAmountPattern.test(value)) {
81
- // If it has a dot but is not two decimals, pad right
82
- if (value.indexOf('.') !== -1) {
83
- let [whole, decimals] = value.split('.');
84
- if (decimals === undefined) return whole + ".00";
85
- if (decimals.length === 1) return whole + "." + decimals + "0";
86
- if (decimals.length === 2) return value;
87
- if (decimals.length > 2) return whole + "." + decimals.slice(0,2);
88
- }
89
- // No decimal: add .00
90
- return value + ".00";
91
- }
92
- // If it's an integer, add .00
93
- if (/^\d+$/.test(value)) {
94
- return value + ".00";
95
- }
96
- }
97
- return value;
98
- },
99
- default: "0.00"
100
- }
101
- }, {
102
- timestamps: true,
103
- toJSON: {virtuals: true},
104
- toObject: {virtuals: true}
105
- })
106
-
107
-
108
- walletSchema.methods.debit = async function(transaction: ITransaction): Promise<void> {
109
- try{
110
- if(transaction.type !== TransactionType.Debit) throw new AdvancedError('Invalid debit transaction', StatusCode.BAD_REQUEST);
111
- if(transaction.status === TransactionStatus.Failed) throw new AdvancedError('This transaction has already failed', StatusCode.BAD_REQUEST);
112
-
113
- //at this point the wallet was found
114
- let hasEnoughBalance = parseFloat(this.balance) >= parseFloat(transaction.amount);
115
- if(!hasEnoughBalance) throw new AdvancedError('Insufficient balance', StatusCode.BAD_REQUEST);
116
-
117
- //at this point the wallet has enough funds to make the debit
118
- if(transaction.status === TransactionStatus.Pending) throw new AdvancedError('This transaction is still pending', StatusCode.BAD_REQUEST);
119
-
120
- //at this point the status is completed
121
- this.balance = (parseFloat(this.balance) - parseFloat(transaction.amount)).toString();
122
- transactionLogger.info("[*] Wallet debited", {wallet: this.toJSON(), transaction: transaction.toJSON()});
123
-
124
- await this.save();
125
- }catch(e: any){
126
- transactionLogger.error("[*] Error debiting wallet", {error: e.message, stack: e.stack});
127
- throw new AdvancedError(e.message, e.statusCode || StatusCode.INTERNAL_SERVER_ERROR)
128
- }
129
- }
130
-
131
-
132
- walletSchema.methods.refund = async function(transaction: ITransaction): Promise<void> {
133
- try{
134
- //check that the transaction is a debit transaction
135
- if(transaction.type !== TransactionType.Debit) throw new AdvancedError("Cannot refund a credit transaction", StatusCode.BAD_REQUEST);
136
- if(transaction.status !== TransactionStatus.Failed) throw new AdvancedError("Cannot refund a successful or pending transaction", StatusCode.BAD_REQUEST);
137
-
138
- //at this point the transaction checks out
139
- //now we can refund the balance to their available balance, since we deducted it from their available balance only
140
- this.availableBalance = parseFloat(this.availableBalance) + parseFloat(transaction.amount);
141
- transactionLogger.info("[*] Wallet refunded", {wallet: this.toJSON(), transaction: transaction.toJSON()});
142
-
143
- await this.save();
144
- }catch(e: any){
145
- transactionLogger.error("[*] Error refunding wallet", {error: e.message, stack: e.stack});
146
- throw new AdvancedError(e.message, e.statusCode || StatusCode.INTERNAL_SERVER_ERROR)
147
- }
148
- }
149
-
150
-
151
- const Wallet = model<IWallet>(config.models.wallet, walletSchema);
152
-
153
-
154
- export default Wallet;
@@ -1,86 +0,0 @@
1
- import { Model, PipelineStage, Types, UpdateQuery, QueryFilter } from "mongoose";
2
-
3
-
4
-
5
- export default class GenericRepository<U> {
6
-
7
- public constructor(public readonly model: Model<U>){}
8
-
9
- public async create(data: Partial<U>): Promise<U>{
10
- const newEntity = await this.model.create(data)
11
- await newEntity.save()
12
-
13
- console.log(`Entity created: ${newEntity.toJSON()}`)
14
-
15
- return newEntity
16
- }
17
-
18
-
19
- public async get(filters: QueryFilter<U>, populate: string[] = []): Promise<U | null>{
20
- const entity = await this.model.findOne(filters).populate(populate)
21
-
22
- return entity
23
- }
24
-
25
-
26
- public async aggregate(pipeline: PipelineStage[]): Promise<any[]> {
27
- const result = await this.model.aggregate(pipeline).exec();
28
-
29
- return result;
30
- }
31
-
32
-
33
- public async exists(filters: QueryFilter<U>): Promise<boolean>{
34
- const entity = await this.model.exists(filters);
35
- return entity ? true : false
36
- }
37
-
38
-
39
- public async count(filters: QueryFilter<U>): Promise<number>{
40
- const count = await this.model.countDocuments(filters);
41
-
42
- return count
43
- }
44
-
45
-
46
- public async getAll(filters: QueryFilter<U>, populate: string[] = []): Promise<U[]>{
47
- const entities = await this.model.find(filters).populate(populate);
48
-
49
- return entities
50
- }
51
-
52
-
53
- public async getAllWithoutVirtuals(filters: QueryFilter<U>, virtuals: boolean, populate: string[] = []): Promise<U[]> {
54
- const entities = await this.model.find(filters).populate(populate).lean({virtuals});
55
-
56
- return entities as U[];
57
- }
58
-
59
-
60
- public async paginate(filters: QueryFilter<U>, populate: string[] = [], limit: number = 20, page: number=1, order: 'asc' | 'desc' = 'desc'): Promise<U[]>{
61
- const entities = await this.model.find(filters).skip(limit * (page - 1)).limit(limit).populate(populate).sort({createdAt: order});
62
-
63
- return entities
64
- }
65
-
66
-
67
- public async update(id: Types.ObjectId, entity: UpdateQuery<U>): Promise<U | null>{
68
- const updatedEntity = await this.model.findByIdAndUpdate(id, entity, {new: true})
69
-
70
- return updatedEntity
71
- }
72
-
73
-
74
- public async delete(id: Types.ObjectId): Promise<U | null>{
75
- const deletedEntity = await this.model.findByIdAndDelete(id)
76
-
77
- return deletedEntity
78
- }
79
-
80
-
81
- public async deleteMany(filters: QueryFilter<U>): Promise<void> {
82
- await this.model.deleteMany(filters);
83
- console.log(`Entities deleted: ${filters}`);
84
- }
85
-
86
- }
package/tsconfig.json DELETED
@@ -1,103 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig to read more about this file */
4
-
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
-
13
- /* Language and Environment */
14
- "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
- // "jsx": "preserve", /* Specify what JSX code is generated. */
17
- // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
18
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
-
27
- /* Modules */
28
- "module": "commonjs", /* Specify what module code is generated. */
29
- // "rootDir": "./", /* Specify the root folder within your source files. */
30
- // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
31
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
- // "resolveJsonModule": true, /* Enable importing .json files. */
39
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
40
-
41
- /* JavaScript Support */
42
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
43
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
44
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
45
-
46
- /* Emit */
47
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
48
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
49
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
50
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
51
- // "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. */
52
- // "outDir": "./", /* Specify an output folder for all emitted files. */
53
- // "removeComments": true, /* Disable emitting comments. */
54
- // "noEmit": true, /* Disable emitting files from a compilation. */
55
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
56
- // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
57
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
58
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
59
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
61
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
62
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
63
- // "newLine": "crlf", /* Set the newline character for emitting files. */
64
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
65
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
66
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
67
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
68
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
69
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
70
-
71
- /* Interop Constraints */
72
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
73
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
74
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
75
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
76
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
77
-
78
- /* Type Checking */
79
- "strict": true, /* Enable all strict type-checking options. */
80
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
81
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
82
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
83
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
84
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
85
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
86
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
87
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
88
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
89
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
90
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
91
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
92
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
93
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
94
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
95
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
96
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
97
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
98
-
99
- /* Completeness */
100
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
101
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
102
- }
103
- }