manufac-analytics / perry

Process Design Utilities
https://manufac-analytics.github.io/perry/
MIT License
0 stars 1 forks source link

Add inorganic-compounds batch1 #3

Closed sumitnegi7 closed 3 years ago

sumitnegi7 commented 3 years ago

Have added more inorganic compounds in local-machine will push them via a new PR after this is approved.

github-actions[bot] commented 3 years ago

size-limit report 📦

Path Size
dist/perry.cjs.production.min.js 24 B (0%)
dist/perry.esm.js 31 B (0%)
sumitnegi7 commented 3 years ago
export interface SolubilitySheet {
  coldWater: Qualitative<SolubilityNature> | QuantitativeSolubility;
  hotWater: Qualitative<SolubilityNature> | QuantitativeSolubility;
  [key: string]: Qualitative<SolubilityNature> | QuantitativeSolubility;
}

Was not able to make coldWater and hotWater optional because of the [key:string] is complaining about it .

maneetgoyal commented 3 years ago
export interface SolubilitySheet {
  coldWater: Qualitative<SolubilityNature> | QuantitativeSolubility;
  hotWater: Qualitative<SolubilityNature> | QuantitativeSolubility;
  [key: string]: Qualitative<SolubilityNature> | QuantitativeSolubility;
}
export interface SolubilitySheet {
  coldWater?: Qualitative<SolubilityNature> | QuantitativeSolubility;
  hotWater?: Qualitative<SolubilityNature> | QuantitativeSolubility;
  [key: string]?: Qualitative<SolubilityNature> | QuantitativeSolubility;
}

Try this.

sumitnegi7 commented 3 years ago
export interface SolubilitySheet {
  coldWater: Qualitative<SolubilityNature> | QuantitativeSolubility;
  hotWater: Qualitative<SolubilityNature> | QuantitativeSolubility;
  [key: string]: Qualitative<SolubilityNature> | QuantitativeSolubility;
}
export interface SolubilitySheet {
  coldWater?: Qualitative<SolubilityNature> | QuantitativeSolubility;
  hotWater?: Qualitative<SolubilityNature> | QuantitativeSolubility;
  [key: string]?: Qualitative<SolubilityNature> | QuantitativeSolubility;
}

Try this.

(type parameter) SolubilityNature in SolubilitySheet.Qualitative(): any 'Qualitative', which lacks return-type annotation, implicitly has an 'any' return type.ts(7010) 'SolubilityNature' is declared but its value is never read

QuantitativeSolubility' only refers to a type, but is being used as a value here.ts(2693)

This works => Should i change it to this?

export interface SolubilitySheet {
  coldWater?: Qualitative<SolubilityNature> | QuantitativeSolubility;
  hotWater?: Qualitative<SolubilityNature> | QuantitativeSolubility;
  [key: string]:
    | Qualitative<SolubilityNature>
    | QuantitativeSolubility
    | undefined;
}
maneetgoyal commented 3 years ago

Have pushed a couple of changes to the PR

maneetgoyal commented 3 years ago

@sumitnegi7 Done with the changes. You can review once and merge if all looks okay.