Skip to content

Commit

Permalink
refactor(interfaces): FundingObject -> FundingInfo
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Dec 1, 2022
1 parent b337b40 commit ab8a328
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
18 changes: 18 additions & 0 deletions src/interfaces/__tests__/funding-info.spec-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* @file Unit Tests - FundingInfo
* @module pkg-types/interfaces/tests/FundingInfo
*/

import type TestSubject from '../funding-info'

describe('unit:interfaces/FundingInfo', () => {
const url: string = 'https://github.com/sponsors/flex-development'

it('should allow object that only has property "url"', () => {
assertType<TestSubject>({ url })
})

it('should allow object with all properties', () => {
assertType<Required<TestSubject>>({ type: 'github', url })
})
})
18 changes: 0 additions & 18 deletions src/interfaces/__tests__/funding-object.spec-d.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file Interfaces - FundingObject
* @module pkg-types/interfaces/FundingObject
* @file Interfaces - FundingInfo
* @module pkg-types/interfaces/FundingInfo
*/

import type { FundingType } from '#src/types'
Expand All @@ -10,7 +10,7 @@ import type { FundingType } from '#src/types'
*
* @see https://docs.npmjs.com/cli/v9/configuring-npm/package-json#funding
*/
interface FundingObject {
interface FundingInfo {
/**
* Package funding type.
*/
Expand All @@ -22,4 +22,4 @@ interface FundingObject {
url: string
}

export type { FundingObject as default }
export type { FundingInfo as default }
2 changes: 1 addition & 1 deletion src/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

export type { default as BugsObject } from './bugs-object'
export type { default as DependencyMeta } from './dependency-meta'
export type { default as FundingObject } from './funding-object'
export type { default as FundingInfo } from './funding-info'
export type { default as InstallConfig } from './install-config'
export type { default as LicenseObject } from './license-object'
export type { default as PeerDependencyMeta } from './peer-dependency-meta'
Expand Down

0 comments on commit ab8a328

Please sign in to comment.