@strapi/typescript-utils 4.10.0-beta.1 → 4.10.1-experimental.0

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.
@@ -36,17 +36,14 @@ const generateGlobalDefinition = (schemasDefinitions = []) => {
36
36
  const properties = schemasDefinitions.map(schemaDefinitionToPropertySignature);
37
37
 
38
38
  return factory.createModuleDeclaration(
39
- undefined,
40
39
  [factory.createModifier(ts.SyntaxKind.DeclareKeyword)],
41
40
  factory.createIdentifier('global'),
42
41
  factory.createModuleBlock([
43
42
  factory.createModuleDeclaration(
44
- undefined,
45
43
  undefined,
46
44
  factory.createIdentifier('Strapi'),
47
45
  factory.createModuleBlock([
48
46
  factory.createInterfaceDeclaration(
49
- undefined,
50
47
  undefined,
51
48
  factory.createIdentifier('Schemas'),
52
49
  undefined,
@@ -23,7 +23,6 @@ module.exports = {
23
23
  );
24
24
 
25
25
  return factory.createImportDeclaration(
26
- undefined,
27
26
  undefined,
28
27
  factory.createImportClause(false, undefined, factory.createNamedImports(formattedImports)),
29
28
  factory.createStringLiteral('@strapi/strapi'),
@@ -34,7 +34,7 @@ const emitDefinitions = (definitions) => {
34
34
  ts.ScriptKind.TS
35
35
  );
36
36
 
37
- const printer = ts.createPrinter({ newLine: true, omitTrailingSemicolon: true });
37
+ const printer = ts.createPrinter({ omitTrailingSemicolon: true });
38
38
 
39
39
  return printer.printList(ts.ListFormat.MultiLine, nodeArray, sourceFile);
40
40
  };
@@ -69,7 +69,6 @@ const generateSchemaDefinition = (schema) => {
69
69
 
70
70
  // Generate the schema's interface declaration
71
71
  const schemaType = factory.createInterfaceDeclaration(
72
- undefined,
73
72
  [factory.createModifier(ts.SyntaxKind.ExportKeyword)],
74
73
  factory.createIdentifier(interfaceName),
75
74
  undefined,
@@ -120,13 +120,7 @@ const toTypeLiteral = (data) => {
120
120
 
121
121
  return [
122
122
  ...acc,
123
- factory.createPropertyDeclaration(
124
- undefined,
125
- undefined,
126
- identifier,
127
- undefined,
128
- toTypeLiteral(value)
129
- ),
123
+ factory.createPropertyDeclaration(undefined, identifier, undefined, toTypeLiteral(value)),
130
124
  ];
131
125
  }, []);
132
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/typescript-utils",
3
- "version": "4.10.0-beta.1",
3
+ "version": "4.10.1-experimental.0",
4
4
  "description": "Typescript support for Strapi",
5
5
  "keywords": [
6
6
  "strapi",
@@ -34,11 +34,11 @@
34
34
  "fs-extra": "10.0.1",
35
35
  "lodash": "4.17.21",
36
36
  "prettier": "2.8.4",
37
- "typescript": "4.6.2"
37
+ "typescript": "5.0.4"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=14.19.1 <=18.x.x",
41
41
  "npm": ">=6.0.0"
42
42
  },
43
- "gitHead": "95d581b31bee464af42e5d8db408fa578d8532c7"
43
+ "gitHead": "ce60415a0779e850da2c2edd80799f98918c000c"
44
44
  }