'Parcel bundled type declarations not being exposed

So I am building a pure typescript library and using parcel as the bundler. when built it generates 3 files to the ./lib folder index.cjs.js index.es.js and index.d.ts now they build just fine and look alright but when installing it into the library the types just don't come up. This are the configs in my package.json. Please, thanks.

 "main": "lib/index.cjs.js",
 "module": "lib/index.es.js",
 "source": "./src/index.ts",
 "types": "lib/index.d.ts",
 "transformers": {
    "*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
  },
 "scripts": {
    "test": "jest",
    "build": "rm -rf ./lib && parcel build --no-source-maps --no-cache",
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx"
  },



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source