mirror of
				https://github.com/n8n-io/n8n-nodes-starter.git
				synced 2025-10-31 07:12:25 -05:00 
			
		
		
		
	Declare as INodeProperties instead of casting
This commit is contained in:
		
					parent
					
						
							
								70753c6598
							
						
					
				
			
			
				commit
				
					
						5e04f87fea
					
				
			
		
					 2 changed files with 8 additions and 8 deletions
				
			
		|  | @ -1,21 +1,21 @@ | ||||||
| import { | import { | ||||||
| 	ICredentialType, | 	ICredentialType, | ||||||
| 	NodePropertyTypes, | 	INodeProperties, | ||||||
| } from 'n8n-workflow'; | } from 'n8n-workflow'; | ||||||
| 
 | 
 | ||||||
| export class FriendGridApi implements ICredentialType { | export class FriendGridApi implements ICredentialType { | ||||||
| 	name = 'friendGridApi'; | 	name = 'friendGridApi'; | ||||||
| 	displayName = 'FriendGrid API'; | 	displayName = 'FriendGrid API'; | ||||||
| 	documentationUrl = 'friendGrid'; | 	documentationUrl = 'friendGrid'; | ||||||
| 	properties = [ | 	properties: INodeProperties[] = [ | ||||||
| 		// The credentials to get from user and save encrypted.
 | 		// The credentials to get from user and save encrypted.
 | ||||||
| 		// Properties can be defined exactly in the same way
 | 		// Properties can be defined exactly in the same way
 | ||||||
| 		// as node properties.
 | 		// as node properties.
 | ||||||
| 		{ | 		{ | ||||||
| 			displayName: 'API Key', | 			displayName: 'API Key', | ||||||
| 			name: 'apiKey', | 			name: 'apiKey', | ||||||
| 			type: 'string' as NodePropertyTypes, | 			type: 'string', | ||||||
| 			default: '', | 			default: '', | ||||||
| 		}, | 		}, | ||||||
| 	]; | 	]; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ import { | ||||||
| 	INodeProperties, | 	INodeProperties, | ||||||
| } from 'n8n-workflow'; | } from 'n8n-workflow'; | ||||||
| 
 | 
 | ||||||
| export const contactOperations = [ | export const contactOperations: INodeProperties[] = [ | ||||||
| 	{ | 	{ | ||||||
| 		displayName: 'Operation', | 		displayName: 'Operation', | ||||||
| 		name: 'operation', | 		name: 'operation', | ||||||
|  | @ -24,9 +24,9 @@ export const contactOperations = [ | ||||||
| 		default: 'create', | 		default: 'create', | ||||||
| 		description: 'The operation to perform', | 		description: 'The operation to perform', | ||||||
| 	}, | 	}, | ||||||
| ] as INodeProperties[]; | ]; | ||||||
| 
 | 
 | ||||||
| export const contactFields = [ | export const contactFields: INodeProperties[] = [ | ||||||
| 	/*-------------------------------------------------------------------------- */ | 	/*-------------------------------------------------------------------------- */ | ||||||
| 	/*                                contact:create                             */ | 	/*                                contact:create                             */ | ||||||
| 	/* ------------------------------------------------------------------------- */ | 	/* ------------------------------------------------------------------------- */ | ||||||
|  | @ -79,4 +79,4 @@ export const contactFields = [ | ||||||
| 			}, | 			}, | ||||||
| 		], | 		], | ||||||
| 	}, | 	}, | ||||||
| ] as INodeProperties[]; | ]; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue