Skip to content

Commit

Permalink
Add docs to types
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 7, 2022
1 parent 79d0698 commit 58f3e42
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
/**
* @typedef {Object} Polarity
* @typedef Polarity
* Info.
* @property {number} polarity
* Calculated polarity of input.
* @property {number} positivity
* Total positivity.
* @property {number} negativity
* Total negativity.
* @property {Array<string>} positive
* All positive words.
* @property {Array<string>} negative
* All negative words.
*
* @typedef {Record<string, number>} Inject
* Values to inject.
*/

import {afinn165} from 'afinn-165'
import {emojiEmotion} from 'emoji-emotion'

/** @type {Record<string, number>} */
/** @type {Inject} */
export const polarities = {}

const own = {}.hasOwnProperty

/** @type {Record<string, number>} */
/** @type {Inject} */
const emoji = {}
let index = 0

Expand Down

0 comments on commit 58f3e42

Please sign in to comment.