8000 It is not possible to use a Symbol as a property key on a service. · Issue #863 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

It is not possible to use a Symbol as a property key on a service. #863

@bertho-zero

Description

@bertho-zero

Steps to reproduce

const feathers = require('@feathersjs/feathers');
const prop = Symbol('test-it');

const app = feathers()
  .use('users', {
    create() {},
    [prop]: 'ok'
  });

const service = app.service('users')
console.log(service[prop]); // undefined
// should be 'ok'

Expected behavior

It should be possible to recover a value with a Symbol key.

Actual behavior

The key disappears.

System configuration

Module versions (especially the part that's not working):
@feathersjs/feathers@^3.1.4

NodeJS version:
v8.11.1

Operating System:
Ubuntu 16.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0