[Real] Typescript has no type

[Real] Typescript has no type

2018/11/23 Office 365 Programming SharePoint 0

If i pass an integer to the function’s parameter “from”, it will become integer and say it doesn’t has “includes” function, since it is belong to class string. This code is tested in SharePoint online with reactjs and typescript.


Below is my tsconfig.json


  "compilerOptions": {
    "target": "es5",
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "jsx": "react",
    "declaration": true,
    "sourceMap": true,
    "experimentalDecorators": true,
    "skipLibCheck": true,
    "outDir": "lib",
    "typeRoots": [
    "types": [
    "lib": [
  "include": [
  "exclude": [

Leave a Reply

Your email address will not be published. Required fields are marked *