Socket
Socket
Sign inDemoInstall

@graphql-codegen/typescript

Package Overview
Dependencies
Maintainers
5
Versions
5911
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/typescript - npm Package Compare versions

Comparing version 0.18.1-alpha.59 to 0.18.1-alpha.63

83

dist/commonjs/index.d.ts

@@ -6,8 +6,91 @@ import { PluginFunction } from '@graphql-codegen/plugin-helpers';

export interface TypeScriptPluginConfig extends RawTypesConfig {
/**
* @name avoidOptionals
* @type boolean
* @description This will cause the generator to avoid using TypeScript optionals (`?`),
* so the following definition: `type A { myField: String }` will output `myField: Maybe<string>`
* instead of `myField?: Maybe<string>`.
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* avoidOptionals: true
* ```
*/
avoidOptionals?: boolean;
/**
* @name constEnums
* @type boolean
* @description Will prefix every generated `enum` with `const`, you can read more
* about const enums {@link https://www.typescriptlang.org/docs/handbook/enums.html|here}.
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* constEnums: true
* ```
*/
constEnums?: boolean;
/**
* @name enumsAsTypes
* @type boolean
* @description Generates enum as TypeScript `type` instead of `enum`. Useful it you wish to genereate `.d.ts` declartion file instead of `.ts`
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* enumsAsTypes: true
* ```
*/
enumsAsTypes?: boolean;
/**
* @name immutableTypes
* @type boolean
* @description Generates immutable types by adding `readonly` to properties and uses `ReadonlyArray`.
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* immutableTypes: true
* ```
*/
immutableTypes?: boolean;
/**
* @name maybeValue
* @type string
* @description Allow to override the type value of `Maybe`.
* @default T | null
*
* @example Allow undefined
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* maybeValue: T | null | undefined
* ```
*/
maybeValue?: string;
}
export declare const plugin: PluginFunction<TypeScriptPluginConfig>;

@@ -6,8 +6,91 @@ import { PluginFunction } from '@graphql-codegen/plugin-helpers';

export interface TypeScriptPluginConfig extends RawTypesConfig {
/**
* @name avoidOptionals
* @type boolean
* @description This will cause the generator to avoid using TypeScript optionals (`?`),
* so the following definition: `type A { myField: String }` will output `myField: Maybe<string>`
* instead of `myField?: Maybe<string>`.
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* avoidOptionals: true
* ```
*/
avoidOptionals?: boolean;
/**
* @name constEnums
* @type boolean
* @description Will prefix every generated `enum` with `const`, you can read more
* about const enums {@link https://www.typescriptlang.org/docs/handbook/enums.html|here}.
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* constEnums: true
* ```
*/
constEnums?: boolean;
/**
* @name enumsAsTypes
* @type boolean
* @description Generates enum as TypeScript `type` instead of `enum`. Useful it you wish to genereate `.d.ts` declartion file instead of `.ts`
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* enumsAsTypes: true
* ```
*/
enumsAsTypes?: boolean;
/**
* @name immutableTypes
* @type boolean
* @description Generates immutable types by adding `readonly` to properties and uses `ReadonlyArray`.
* @default false
*
* @example
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* immutableTypes: true
* ```
*/
immutableTypes?: boolean;
/**
* @name maybeValue
* @type string
* @description Allow to override the type value of `Maybe`.
* @default T | null
*
* @example Allow undefined
* ```yml
* generates:
* path/to/file.ts:
* plugins:
* - typescript
* config:
* maybeValue: T | null | undefined
* ```
*/
maybeValue?: string;
}
export declare const plugin: PluginFunction<TypeScriptPluginConfig>;

10

package.json
{
"name": "@graphql-codegen/typescript",
"version": "0.18.1-alpha.59+c8b59c87",
"version": "0.18.1-alpha.63+3b44d0d5",
"description": "GraphQL Code Generator plugin for generating TypeScript types",

@@ -12,8 +12,8 @@ "repository": "git@github.com:dotansimha/graphql-code-generator.git",

"dependencies": {
"@graphql-codegen/plugin-helpers": "0.18.1-alpha.59+c8b59c87",
"@graphql-codegen/visitor-plugin-common": "0.18.1-alpha.59+c8b59c87",
"@graphql-codegen/plugin-helpers": "0.18.1-alpha.63+3b44d0d5",
"@graphql-codegen/visitor-plugin-common": "0.18.1-alpha.63+3b44d0d5",
"tslib": "1.9.3"
},
"devDependencies": {
"@graphql-codegen/testing": "0.18.1-alpha.59+c8b59c87",
"@graphql-codegen/testing": "0.18.1-alpha.63+3b44d0d5",
"graphql": "14.1.1",

@@ -34,3 +34,3 @@ "jest": "24.5.0",

},
"gitHead": "c8b59c8737fdc9e68dd8dbb3b8640ef4d64b7aaf"
"gitHead": "3b44d0d5ef0a11fb9e6d07ca1655aab61b3068d6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc