chore: upgrade typescript to 3.5.3
parent
d599eddbae
commit
23dbffd7e3
|
@ -113,7 +113,7 @@
|
|||
"ts-loader": "^5.3.3",
|
||||
"ts-node": "^8.3.0",
|
||||
"tslib": "^1.9.0",
|
||||
"typescript": "3.4.5",
|
||||
"typescript": "3.5.3",
|
||||
"webpack": "^4.37.0",
|
||||
"webpack-cli": "^3.3.6",
|
||||
"webpack-dev-server": "^3.7.2",
|
||||
|
|
|
@ -92,11 +92,11 @@ export default class CSVTemplateBuilder extends PureComponent<Props, State> {
|
|||
this.setState({csv})
|
||||
}
|
||||
|
||||
private getUniqueValuesFromCSV(csv: string) {
|
||||
private getUniqueValuesFromCSV(csv: string): string[] {
|
||||
const parsedTVS = Papa.parse(csv)
|
||||
const templateValuesData: string[][] = _.get(parsedTVS, 'data', [[]])
|
||||
|
||||
const valueSet = new Set()
|
||||
const valueSet: Set<string> = new Set()
|
||||
for (const row of templateValuesData) {
|
||||
for (const value of row) {
|
||||
const trimmedValue = trimAndRemoveQuotes(value)
|
||||
|
|
|
@ -93,7 +93,7 @@ const getVarChildren = (
|
|||
*/
|
||||
const collectAncestors = (
|
||||
node: VariableNode,
|
||||
acc = new Set()
|
||||
acc: Set<VariableNode> = new Set()
|
||||
): VariableNode[] => {
|
||||
for (const parent of node.parents) {
|
||||
if (!acc.has(parent)) {
|
||||
|
@ -119,7 +119,7 @@ const findSubgraph = (
|
|||
graph: VariableNode[],
|
||||
variables: Variable[]
|
||||
): VariableNode[] => {
|
||||
const subgraph = new Set()
|
||||
const subgraph: Set<VariableNode> = new Set()
|
||||
|
||||
for (const node of graph) {
|
||||
const shouldKeep =
|
||||
|
@ -204,7 +204,7 @@ const constVariableValues = (
|
|||
*/
|
||||
export const collectDescendants = (
|
||||
node: VariableNode,
|
||||
acc = new Set()
|
||||
acc: Set<VariableNode> = new Set()
|
||||
): VariableNode[] => {
|
||||
for (const child of node.children) {
|
||||
if (!acc.has(child)) {
|
||||
|
|
|
@ -36,7 +36,7 @@ export const csvToMap = (csv: string): MapResult => {
|
|||
return {values, errors}
|
||||
}
|
||||
|
||||
export const trimAndRemoveQuotes = elt => {
|
||||
export const trimAndRemoveQuotes = (elt: string): string => {
|
||||
const trimmed = elt.trim()
|
||||
const dequoted = trimmed.replace(/(^")|("$)/g, '')
|
||||
|
||||
|
|
|
@ -11834,10 +11834,10 @@ typedarray@^0.0.6:
|
|||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@3.4.5:
|
||||
version "3.4.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
|
||||
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
|
||||
typescript@3.5.3:
|
||||
version "3.5.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
||||
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
||||
|
||||
ua-parser-js@^0.7.18:
|
||||
version "0.7.18"
|
||||
|
|
Loading…
Reference in New Issue