Adding more docs to licenses.ts

This commit is contained in:
Federico Builes
2022-06-09 10:33:05 +02:00
parent 20cca5c0c4
commit 6b5518a9ed

View File

@@ -3,6 +3,11 @@ import {Change, ChangeSchema} from './schemas'
/**
* Loops through a list of changes, filtering and returning the
* ones that don't conform to the licenses allow/deny lists.
*
* Keep in mind that we don't let users specify both an allow and a deny
* list in their config files, so this code works under the assumption that
* one of the two list parameters will be empty. If both lists are provided,
* we will ignore the deny list.
* @param {Change[]} changes The list of changes to filter.
* @param { { allow?: string[], deny?: string[]}} licenses An object with `allow`/`deny` keys, each containing a list of licenses.
* @returns {Array<Change} The list of denied changes.