Skip to content

$d accepts string as input #1113

Open
Open
@Shinigami92

Description

@Shinigami92

Reporting a bug?

Currently $d only allows number or Date as input via TypeScript
But we are using ISO 8601 strings and using these as input is totally fine and renders correctly
But vue-tsc throws ts compile time errors

Expected behavior

Allow string as input for $d so it doesn't throw a compile time error

Reproduction

{{ $d('2022-08-08T08:56:45.846Z') }}

System Info

System:
    OS: macOS 12.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 699.39 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
    npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Safari: 15.6
  npmPackages:
    @vitejs/plugin-vue: ~3.0.1 => 3.0.1 
    @vue/apollo-composable: ~4.0.0-alpha.19 => 4.0.0-alpha.19 
    @vue/compiler-sfc: ~3.2.37 => 3.2.37 
    @vue/test-utils: ~2.0.2 => 2.0.2 
    vite: ~3.0.4 => 3.0.4 
    vite-plugin-git-revision: ~0.1.9 => 0.1.9 
    vitest: ~0.21.0 => 0.21.0 
    vue: ~3.2.37 => 3.2.37 
    vue-eslint-parser: ~9.0.3 => 9.0.3 
    vue-i18n: ~9.2.2 => 9.2.2 
    vue-router: ~4.1.3 => 4.1.3 
    vue-tsc: ~0.39.5 => 0.39.5

Screenshot

image

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugBug or Bug fixestypescript❗ p4-importantPriority 4: bugs that violate documented behavior, or significantly impact perf

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions