title: Property 'y' does not exist on type 'number'
body: <p>I am working on creating a project with <code>Vue.js</code> and <code>Quasar</code> using <code>TypeScript</code>, but here, I have got errors telling me as below :</p>
  <blockquote>
  <p>Property 'y' does not exist on type 'number | { x: number[]; y: number[]; }'.
  Property 'y' does not exist on type 'number'.</p>
  </blockquote>
  <p>I know what it means, but I really have no idea how to solve this error since I reckon that <code>y</code> should exist on type <code>number</code>.</p>
  <pre class="lang-js prettyprint-override"><code>&lt;script lang=&quot;ts&quot;&gt;
  import Vue from 'vue';
  export default Vue.extend({
    data() {
      return {
        filteredName: 'All',
        chartOptionsClickQty: chartOptions.lineChart,
        chartOptionsRevBuy: chartOptions.mixedChart,
      };
    },
    created() {
      this.initData();
    },
    methods: {
      initChartOptions() {
        const { timePeriod } = this;
        const { currentStartDate, currentEndDate } = this.analysticFilter;
  
        const buyRatioRows = this.getRowsPerDateBuyRatio(
          timePeriod.current,
          new Date(currentStartDate),
          new Date(currentEndDate)
        );
  
        const revenueRows = this.getRowsPerDate(
          timePeriod.current,
          new Date(currentStartDate),
          new Date(currentEndDate),
          'revenue'
        );
  
        const revenueChartData = {
          key: this.filteredName,
          values: revenueRows,
        };
  
        const buyRatioChartdata = {
          key: this.filteredName,
          values: buyRatioRows,
        };
  
  
        this.chartOptionsRevBuy = Object.assign({}, this.chartOptionsRevBuy, {
          chart: { height: 385 },
          xaxis: { categories: revenueChartData.values.x },
          yaxis: [
            {
              title: {
                text: 'Text1',
              },
              forceNiceScale: true,
              min: 0,
              max: Math.max(...revenueChartData.values.y) + 20,
              labels: {
                formatter: function (val: number) {
                  return val.toFixed();
                },
              },
            },
            {
              opposite: true,
              title: {
                text: 'Text2',
              },
              min: 0,
  
              // --- This is where the error occurs..
              max: Math.max(...buyRatioChartdata.values.y) + 20,
              labels: {
                formatter: function (val: number) {
                  return val.toFixed();
                },
              },
            },
          ],
        });
  
  
        this.seriesRevBuy[0].name = 'Total Price(￦)';
        this.seriesRevBuy[0].data = revenueChartData.values.y;
        this.seriesRevBuy[1].name = 'Ratio(%)';
  
        // --- Here `y` as well
        this.seriesRevBuy[1].data = buyRatioChartdata.values[0].y;
        this.seriesRevBuy[1].data = buyRatioChartdata.values[0].y.map(
          (item: number) =&gt; item.toFixed(1)
        );
      },
      async initData() {
        this.initChartOptions();
  
      },
      getRowsPerDateBuyRatio(
        items: any[],
        queryStartDate: Date,
        queryEndDate: Date
      ) {
        ....
  
        // --- Here is the part where the error comes I guess
        let yMax = [] as Array&lt;number&gt;;
  
        items.forEach(function (item) {
          let buyRatio = (item.clickSessions * 100) / item.users;
          item.buyRatio = Math.min(100, buyRatio);
  
          // --- I even changed this `string` into `number`
          yMax.push(item.buyRatio.toFixed() as number);
          let created = new Date(item.created);
          valuePerDate[created.getTime()] = item.buyRatio;
        });
  
        const rows = {
          x: [] as Array&lt;number&gt;,
          y: [] as Array&lt;number&gt;,
        };
  
        const y = Math.max.apply(null, yMax);
        periodArray.forEach(function (created) {
          rows.x.push(created.getTime());
          rows.y.push(valuePerDate[created.getTime()]);
        });
  
        return [rows, y];
      },
    },
  });
  &lt;/script&gt;
  
  </code></pre>
  <p>chartOptions.ts</p>
  <pre class="lang-js prettyprint-override"><code>export const chartOptions = {
     mixedChart: {
      series: [
        {
          name: '',
          type: 'column',
          data: [] as Array&lt;number&gt;,
        },
        {
          name: '',
          type: 'line',
          data: [] as Array&lt;number&gt;,
        },
      ],
      xaxis: {
        type: 'datetime',
        categories: [] as Array&lt;number&gt;,
        labels: {
          datetimeUTC: false,
        },
      },
      yaxis: [
        {
          title: {
            text: '구매클릭합계',
          },
        },
        {
          opposite: true,
          title: {
            text: '전환율',
          },
        },
      ],
    },
  }
  
  </code></pre>
  <p>This error is obviously from <code>TypeScript</code>. Please let me know what I am missing.</p>
  <p><code>buyRatiochartdata</code> has these types, so in my opinion, <code>y</code> should exist on it..</p>
  <p><a href="https://i.stack.imgur.com/s7TW2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s7TW2.png" alt="buyRatiochartdata has these types, so in my opinion, y should exist on it.." /></a></p>